allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
29
vendor/google/protobuf/LICENSE
vendored
Normal file
29
vendor/google/protobuf/LICENSE
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2019, Protocol Buffers
|
||||
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 the copyright holder 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 HOLDER 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.
|
||||
2
vendor/google/protobuf/README.md
vendored
Normal file
2
vendor/google/protobuf/README.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# protobuf-php
|
||||
This repository contains only PHP files to support Composer installation. This repository is a mirror of [protobuf](https://github.com/protocolbuffers/protobuf). Any support requests, bug reports, or development contributions should be directed to that project. To install protobuf for PHP, please see https://github.com/protocolbuffers/protobuf/tree/master/php
|
||||
24
vendor/google/protobuf/composer.json
vendored
Normal file
24
vendor/google/protobuf/composer.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "google/protobuf",
|
||||
"type": "library",
|
||||
"description": "proto library for PHP",
|
||||
"keywords": ["proto"],
|
||||
"homepage": "https://developers.google.com/protocol-buffers/",
|
||||
"license": "BSD-3-Clause",
|
||||
"require": {
|
||||
"php": ">=8.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=5.0.0 <8.5.27"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Need to support JSON deserialization"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Google\\Protobuf\\": "src/Google/Protobuf",
|
||||
"GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/any.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Any
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xD4\x01\x0A\x19google/protobuf/any.proto\x12\x0Fgoogle.protobuf\"&\x0A\x03Any\x12\x10\x0A\x08type_url\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x0CBv\x0A\x13com.google.protobufB\x08AnyProtoP\x01Z,google.golang.org/protobuf/types/known/anypb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
27
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
vendored
Normal file
27
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/api.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Api
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
\GPBMetadata\Google\Protobuf\SourceContext::initOnce();
|
||||
\GPBMetadata\Google\Protobuf\Type::initOnce();
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xF3\x05\x0A\x19google/protobuf/api.proto\x12\x0Fgoogle.protobuf\x1A\x1Agoogle/protobuf/type.proto\"\x92\x02\x0A\x03Api\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12(\x0A\x07methods\x18\x02 \x03(\x0B2\x17.google.protobuf.Method\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\x12\x0F\x0A\x07version\x18\x04 \x01(\x09\x126\x0A\x0Esource_context\x18\x05 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12&\x0A\x06mixins\x18\x06 \x03(\x0B2\x16.google.protobuf.Mixin\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\x12\x0F\x0A\x07edition\x18\x08 \x01(\x09\"\xEE\x01\x0A\x06Method\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x18\x0A\x10request_type_url\x18\x02 \x01(\x09\x12\x19\x0A\x11request_streaming\x18\x03 \x01(\x08\x12\x19\x0A\x11response_type_url\x18\x04 \x01(\x09\x12\x1A\x0A\x12response_streaming\x18\x05 \x01(\x08\x12(\x0A\x07options\x18\x06 \x03(\x0B2\x17.google.protobuf.Option\x12+\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.SyntaxB\x02\x18\x01\x12\x13\x0A\x07edition\x18\x08 \x01(\x09B\x02\x18\x01\"#\x0A\x05Mixin\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04root\x18\x02 \x01(\x09Bv\x0A\x13com.google.protobufB\x08ApiProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/duration.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Duration
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xEB\x01\x0A\x1Egoogle/protobuf/duration.proto\x12\x0Fgoogle.protobuf\"*\x0A\x08Duration\x12\x0F\x0A\x07seconds\x18\x01 \x01(\x03\x12\x0D\x0A\x05nanos\x18\x02 \x01(\x05B\x83\x01\x0A\x13com.google.protobufB\x0DDurationProtoP\x01Z1google.golang.org/protobuf/types/known/durationpb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/field_mask.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class FieldMask
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xDF\x01\x0A google/protobuf/field_mask.proto\x12\x0Fgoogle.protobuf\"\x1A\x0A\x09FieldMask\x12\x0D\x0A\x05paths\x18\x01 \x03(\x09B\x85\x01\x0A\x13com.google.protobufB\x0EFieldMaskProtoP\x01Z2google.golang.org/protobuf/types/known/fieldmaskpb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/empty.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class GPBEmpty
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xBE\x01\x0A\x1Bgoogle/protobuf/empty.proto\x12\x0Fgoogle.protobuf\"\x07\x0A\x05EmptyB}\x0A\x13com.google.protobufB\x0AEmptyProtoP\x01Z.google.golang.org/protobuf/types/known/emptypb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
453
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
vendored
Normal file
453
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
vendored
Normal file
@@ -0,0 +1,453 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf\Internal;
|
||||
|
||||
class Descriptor
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->addMessage('google.protobuf.internal.FileDescriptorSet', \Google\Protobuf\Internal\FileDescriptorSet::class)
|
||||
->repeated('file', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FileDescriptorProto')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FileDescriptorProto', \Google\Protobuf\Internal\FileDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('package', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->repeated('dependency', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->repeated('public_dependency', \Google\Protobuf\Internal\GPBType::INT32, 10)
|
||||
->repeated('weak_dependency', \Google\Protobuf\Internal\GPBType::INT32, 11)
|
||||
->repeated('option_dependency', \Google\Protobuf\Internal\GPBType::STRING, 15)
|
||||
->repeated('message_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.DescriptorProto')
|
||||
->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.EnumDescriptorProto')
|
||||
->repeated('service', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.ServiceDescriptorProto')
|
||||
->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FieldDescriptorProto')
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions')
|
||||
->optional('source_code_info', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo')
|
||||
->optional('syntax', \Google\Protobuf\Internal\GPBType::STRING, 12)
|
||||
->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 14, 'google.protobuf.internal.Edition')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->repeated('field', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FieldDescriptorProto')
|
||||
->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.FieldDescriptorProto')
|
||||
->repeated('nested_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.DescriptorProto')
|
||||
->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto')
|
||||
->repeated('extension_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.DescriptorProto.ExtensionRange')
|
||||
->repeated('oneof_decl', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.OneofDescriptorProto')
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.MessageOptions')
|
||||
->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.DescriptorProto.ReservedRange')
|
||||
->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
|
||||
->optional('visibility', \Google\Protobuf\Internal\GPBType::ENUM, 11, 'google.protobuf.internal.SymbolVisibility')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class)
|
||||
->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ExtensionRangeOptions')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class)
|
||||
->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.ExtensionRangeOptions', \Google\Protobuf\Internal\ExtensionRangeOptions::class)
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->repeated('declaration', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.ExtensionRangeOptions.Declaration')
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 50, 'google.protobuf.internal.FeatureSet')
|
||||
->optional('verification', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.ExtensionRangeOptions.VerificationState')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.ExtensionRangeOptions.Declaration', \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration::class)
|
||||
->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->optional('full_name', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->optional('type', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->optional('reserved', \Google\Protobuf\Internal\GPBType::BOOL, 5)
|
||||
->optional('repeated', \Google\Protobuf\Internal\GPBType::BOOL, 6)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.ExtensionRangeOptions.VerificationState', \Google\Protobuf\Internal\VerificationState::class)
|
||||
->value("DECLARATION", 0)
|
||||
->value("UNVERIFIED", 1)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 3)
|
||||
->optional('label', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FieldDescriptorProto.Label')
|
||||
->optional('type', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FieldDescriptorProto.Type')
|
||||
->optional('type_name', \Google\Protobuf\Internal\GPBType::STRING, 6)
|
||||
->optional('extendee', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->optional('default_value', \Google\Protobuf\Internal\GPBType::STRING, 7)
|
||||
->optional('oneof_index', \Google\Protobuf\Internal\GPBType::INT32, 9)
|
||||
->optional('json_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FieldOptions')
|
||||
->optional('proto3_optional', \Google\Protobuf\Internal\GPBType::BOOL, 17)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Type', \Google\Protobuf\Internal\Type::class)
|
||||
->value("TYPE_DOUBLE", 1)
|
||||
->value("TYPE_FLOAT", 2)
|
||||
->value("TYPE_INT64", 3)
|
||||
->value("TYPE_UINT64", 4)
|
||||
->value("TYPE_INT32", 5)
|
||||
->value("TYPE_FIXED64", 6)
|
||||
->value("TYPE_FIXED32", 7)
|
||||
->value("TYPE_BOOL", 8)
|
||||
->value("TYPE_STRING", 9)
|
||||
->value("TYPE_GROUP", 10)
|
||||
->value("TYPE_MESSAGE", 11)
|
||||
->value("TYPE_BYTES", 12)
|
||||
->value("TYPE_UINT32", 13)
|
||||
->value("TYPE_ENUM", 14)
|
||||
->value("TYPE_SFIXED32", 15)
|
||||
->value("TYPE_SFIXED64", 16)
|
||||
->value("TYPE_SINT32", 17)
|
||||
->value("TYPE_SINT64", 18)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class)
|
||||
->value("LABEL_OPTIONAL", 1)
|
||||
->value("LABEL_REPEATED", 3)
|
||||
->value("LABEL_REQUIRED", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.OneofOptions')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.EnumDescriptorProto', \Google\Protobuf\Internal\EnumDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->repeated('value', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto')
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions')
|
||||
->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto.EnumReservedRange')
|
||||
->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 5)
|
||||
->optional('visibility', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.SymbolVisibility')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.EnumDescriptorProto.EnumReservedRange', \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class)
|
||||
->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', \Google\Protobuf\Internal\EnumValueDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 2)
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumValueOptions')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.ServiceDescriptorProto', \Google\Protobuf\Internal\ServiceDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->repeated('method', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.MethodDescriptorProto')
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ServiceOptions')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.MethodDescriptorProto', \Google\Protobuf\Internal\MethodDescriptorProto::class)
|
||||
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('input_type', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->optional('output_type', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.MethodOptions')
|
||||
->optional('client_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 5)
|
||||
->optional('server_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 6)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FileOptions', \Google\Protobuf\Internal\FileOptions::class)
|
||||
->optional('java_package', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->optional('java_outer_classname', \Google\Protobuf\Internal\GPBType::STRING, 8)
|
||||
->optional('java_multiple_files', \Google\Protobuf\Internal\GPBType::BOOL, 10)
|
||||
->optional('java_generate_equals_and_hash', \Google\Protobuf\Internal\GPBType::BOOL, 20)
|
||||
->optional('java_string_check_utf8', \Google\Protobuf\Internal\GPBType::BOOL, 27)
|
||||
->optional('optimize_for', \Google\Protobuf\Internal\GPBType::ENUM, 9, 'google.protobuf.internal.FileOptions.OptimizeMode')
|
||||
->optional('go_package', \Google\Protobuf\Internal\GPBType::STRING, 11)
|
||||
->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16)
|
||||
->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17)
|
||||
->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23)
|
||||
->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31)
|
||||
->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36)
|
||||
->optional('csharp_namespace', \Google\Protobuf\Internal\GPBType::STRING, 37)
|
||||
->optional('swift_prefix', \Google\Protobuf\Internal\GPBType::STRING, 39)
|
||||
->optional('php_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 40)
|
||||
->optional('php_namespace', \Google\Protobuf\Internal\GPBType::STRING, 41)
|
||||
->optional('php_metadata_namespace', \Google\Protobuf\Internal\GPBType::STRING, 44)
|
||||
->optional('ruby_package', \Google\Protobuf\Internal\GPBType::STRING, 45)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 50, 'google.protobuf.internal.FeatureSet')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FileOptions.OptimizeMode', \Google\Protobuf\Internal\OptimizeMode::class)
|
||||
->value("SPEED", 1)
|
||||
->value("CODE_SIZE", 2)
|
||||
->value("LITE_RUNTIME", 3)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.MessageOptions', \Google\Protobuf\Internal\MessageOptions::class)
|
||||
->optional('message_set_wire_format', \Google\Protobuf\Internal\GPBType::BOOL, 1)
|
||||
->optional('no_standard_descriptor_accessor', \Google\Protobuf\Internal\GPBType::BOOL, 2)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
|
||||
->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7)
|
||||
->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 11)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 12, 'google.protobuf.internal.FeatureSet')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FieldOptions', \Google\Protobuf\Internal\FieldOptions::class)
|
||||
->optional('ctype', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FieldOptions.CType')
|
||||
->optional('packed', \Google\Protobuf\Internal\GPBType::BOOL, 2)
|
||||
->optional('jstype', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FieldOptions.JSType')
|
||||
->optional('lazy', \Google\Protobuf\Internal\GPBType::BOOL, 5)
|
||||
->optional('unverified_lazy', \Google\Protobuf\Internal\GPBType::BOOL, 15)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
|
||||
->optional('weak', \Google\Protobuf\Internal\GPBType::BOOL, 10)
|
||||
->optional('debug_redact', \Google\Protobuf\Internal\GPBType::BOOL, 16)
|
||||
->optional('retention', \Google\Protobuf\Internal\GPBType::ENUM, 17, 'google.protobuf.internal.FieldOptions.OptionRetention')
|
||||
->repeated('targets', \Google\Protobuf\Internal\GPBType::ENUM, 19, 'google.protobuf.internal.FieldOptions.OptionTargetType')
|
||||
->repeated('edition_defaults', \Google\Protobuf\Internal\GPBType::MESSAGE, 20, 'google.protobuf.internal.FieldOptions.EditionDefault')
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 21, 'google.protobuf.internal.FeatureSet')
|
||||
->optional('feature_support', \Google\Protobuf\Internal\GPBType::MESSAGE, 22, 'google.protobuf.internal.FieldOptions.FeatureSupport')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FieldOptions.EditionDefault', \Google\Protobuf\Internal\FieldOptions\EditionDefault::class)
|
||||
->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.Edition')
|
||||
->optional('value', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FieldOptions.FeatureSupport', \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class)
|
||||
->optional('edition_introduced', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.Edition')
|
||||
->optional('edition_deprecated', \Google\Protobuf\Internal\GPBType::ENUM, 2, 'google.protobuf.internal.Edition')
|
||||
->optional('deprecation_warning', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->optional('edition_removed', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.Edition')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldOptions.CType', \Google\Protobuf\Internal\CType::class)
|
||||
->value("STRING", 0)
|
||||
->value("CORD", 1)
|
||||
->value("STRING_PIECE", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldOptions.JSType', \Google\Protobuf\Internal\JSType::class)
|
||||
->value("JS_NORMAL", 0)
|
||||
->value("JS_STRING", 1)
|
||||
->value("JS_NUMBER", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldOptions.OptionRetention', \Google\Protobuf\Internal\OptionRetention::class)
|
||||
->value("RETENTION_UNKNOWN", 0)
|
||||
->value("RETENTION_RUNTIME", 1)
|
||||
->value("RETENTION_SOURCE", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FieldOptions.OptionTargetType', \Google\Protobuf\Internal\OptionTargetType::class)
|
||||
->value("TARGET_TYPE_UNKNOWN", 0)
|
||||
->value("TARGET_TYPE_FILE", 1)
|
||||
->value("TARGET_TYPE_EXTENSION_RANGE", 2)
|
||||
->value("TARGET_TYPE_MESSAGE", 3)
|
||||
->value("TARGET_TYPE_FIELD", 4)
|
||||
->value("TARGET_TYPE_ONEOF", 5)
|
||||
->value("TARGET_TYPE_ENUM", 6)
|
||||
->value("TARGET_TYPE_ENUM_ENTRY", 7)
|
||||
->value("TARGET_TYPE_SERVICE", 8)
|
||||
->value("TARGET_TYPE_METHOD", 9)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.OneofOptions', \Google\Protobuf\Internal\OneofOptions::class)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FeatureSet')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.EnumOptions', \Google\Protobuf\Internal\EnumOptions::class)
|
||||
->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
|
||||
->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 6)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FeatureSet')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.EnumValueOptions', \Google\Protobuf\Internal\EnumValueOptions::class)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 1)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FeatureSet')
|
||||
->optional('debug_redact', \Google\Protobuf\Internal\GPBType::BOOL, 3)
|
||||
->optional('feature_support', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.FieldOptions.FeatureSupport')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.ServiceOptions', \Google\Protobuf\Internal\ServiceOptions::class)
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 34, 'google.protobuf.internal.FeatureSet')
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.MethodOptions', \Google\Protobuf\Internal\MethodOptions::class)
|
||||
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
|
||||
->optional('idempotency_level', \Google\Protobuf\Internal\GPBType::ENUM, 34, 'google.protobuf.internal.MethodOptions.IdempotencyLevel')
|
||||
->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 35, 'google.protobuf.internal.FeatureSet')
|
||||
->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.MethodOptions.IdempotencyLevel', \Google\Protobuf\Internal\IdempotencyLevel::class)
|
||||
->value("IDEMPOTENCY_UNKNOWN", 0)
|
||||
->value("NO_SIDE_EFFECTS", 1)
|
||||
->value("IDEMPOTENT", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.UninterpretedOption', \Google\Protobuf\Internal\UninterpretedOption::class)
|
||||
->repeated('name', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.UninterpretedOption.NamePart')
|
||||
->optional('identifier_value', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->optional('positive_int_value', \Google\Protobuf\Internal\GPBType::UINT64, 4)
|
||||
->optional('negative_int_value', \Google\Protobuf\Internal\GPBType::INT64, 5)
|
||||
->optional('double_value', \Google\Protobuf\Internal\GPBType::DOUBLE, 6)
|
||||
->optional('string_value', \Google\Protobuf\Internal\GPBType::BYTES, 7)
|
||||
->optional('aggregate_value', \Google\Protobuf\Internal\GPBType::STRING, 8)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.UninterpretedOption.NamePart', \Google\Protobuf\Internal\UninterpretedOption\NamePart::class)
|
||||
->required('name_part', \Google\Protobuf\Internal\GPBType::STRING, 1)
|
||||
->required('is_extension', \Google\Protobuf\Internal\GPBType::BOOL, 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FeatureSet', \Google\Protobuf\Internal\FeatureSet::class)
|
||||
->optional('field_presence', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FeatureSet.FieldPresence')
|
||||
->optional('enum_type', \Google\Protobuf\Internal\GPBType::ENUM, 2, 'google.protobuf.internal.FeatureSet.EnumType')
|
||||
->optional('repeated_field_encoding', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.FeatureSet.RepeatedFieldEncoding')
|
||||
->optional('utf8_validation', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FeatureSet.Utf8Validation')
|
||||
->optional('message_encoding', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FeatureSet.MessageEncoding')
|
||||
->optional('json_format', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FeatureSet.JsonFormat')
|
||||
->optional('enforce_naming_style', \Google\Protobuf\Internal\GPBType::ENUM, 7, 'google.protobuf.internal.FeatureSet.EnforceNamingStyle')
|
||||
->optional('default_symbol_visibility', \Google\Protobuf\Internal\GPBType::ENUM, 8, 'google.protobuf.internal.FeatureSet.VisibilityFeature.DefaultSymbolVisibility')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FeatureSet.VisibilityFeature', \Google\Protobuf\Internal\FeatureSet\VisibilityFeature::class)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.VisibilityFeature.DefaultSymbolVisibility', \Google\Protobuf\Internal\DefaultSymbolVisibility::class)
|
||||
->value("DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", 0)
|
||||
->value("EXPORT_ALL", 1)
|
||||
->value("EXPORT_TOP_LEVEL", 2)
|
||||
->value("LOCAL_ALL", 3)
|
||||
->value("STRICT", 4)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.FieldPresence', \Google\Protobuf\Internal\FieldPresence::class)
|
||||
->value("FIELD_PRESENCE_UNKNOWN", 0)
|
||||
->value("EXPLICIT", 1)
|
||||
->value("IMPLICIT", 2)
|
||||
->value("LEGACY_REQUIRED", 3)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.EnumType', \Google\Protobuf\Internal\EnumType::class)
|
||||
->value("ENUM_TYPE_UNKNOWN", 0)
|
||||
->value("OPEN", 1)
|
||||
->value("CLOSED", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.RepeatedFieldEncoding', \Google\Protobuf\Internal\RepeatedFieldEncoding::class)
|
||||
->value("REPEATED_FIELD_ENCODING_UNKNOWN", 0)
|
||||
->value("PACKED", 1)
|
||||
->value("EXPANDED", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.Utf8Validation', \Google\Protobuf\Internal\Utf8Validation::class)
|
||||
->value("UTF8_VALIDATION_UNKNOWN", 0)
|
||||
->value("VERIFY", 2)
|
||||
->value("NONE", 3)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.MessageEncoding', \Google\Protobuf\Internal\MessageEncoding::class)
|
||||
->value("MESSAGE_ENCODING_UNKNOWN", 0)
|
||||
->value("LENGTH_PREFIXED", 1)
|
||||
->value("DELIMITED", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.JsonFormat', \Google\Protobuf\Internal\JsonFormat::class)
|
||||
->value("JSON_FORMAT_UNKNOWN", 0)
|
||||
->value("ALLOW", 1)
|
||||
->value("LEGACY_BEST_EFFORT", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.FeatureSet.EnforceNamingStyle', \Google\Protobuf\Internal\EnforceNamingStyle::class)
|
||||
->value("ENFORCE_NAMING_STYLE_UNKNOWN", 0)
|
||||
->value("STYLE2024", 1)
|
||||
->value("STYLE_LEGACY", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FeatureSetDefaults', \Google\Protobuf\Internal\FeatureSetDefaults::class)
|
||||
->repeated('defaults', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FeatureSetDefaults.FeatureSetEditionDefault')
|
||||
->optional('minimum_edition', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.Edition')
|
||||
->optional('maximum_edition', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.Edition')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.FeatureSetDefaults.FeatureSetEditionDefault', \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault::class)
|
||||
->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.Edition')
|
||||
->optional('overridable_features', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.FeatureSet')
|
||||
->optional('fixed_features', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.FeatureSet')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.SourceCodeInfo', \Google\Protobuf\Internal\SourceCodeInfo::class)
|
||||
->repeated('location', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.SourceCodeInfo.Location', \Google\Protobuf\Internal\SourceCodeInfo\Location::class)
|
||||
->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->repeated('span', \Google\Protobuf\Internal\GPBType::INT32, 2)
|
||||
->optional('leading_comments', \Google\Protobuf\Internal\GPBType::STRING, 3)
|
||||
->optional('trailing_comments', \Google\Protobuf\Internal\GPBType::STRING, 4)
|
||||
->repeated('leading_detached_comments', \Google\Protobuf\Internal\GPBType::STRING, 6)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.GeneratedCodeInfo', \Google\Protobuf\Internal\GeneratedCodeInfo::class)
|
||||
->repeated('annotation', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.GeneratedCodeInfo.Annotation')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addMessage('google.protobuf.internal.GeneratedCodeInfo.Annotation', \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class)
|
||||
->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
|
||||
->optional('source_file', \Google\Protobuf\Internal\GPBType::STRING, 2)
|
||||
->optional('begin', \Google\Protobuf\Internal\GPBType::INT32, 3)
|
||||
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 4)
|
||||
->optional('semantic', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.GeneratedCodeInfo.Annotation.Semantic')
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.GeneratedCodeInfo.Annotation.Semantic', \Google\Protobuf\Internal\Semantic::class)
|
||||
->value("NONE", 0)
|
||||
->value("SET", 1)
|
||||
->value("ALIAS", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.Edition', \Google\Protobuf\Internal\Edition::class)
|
||||
->value("EDITION_UNKNOWN", 0)
|
||||
->value("EDITION_LEGACY", 900)
|
||||
->value("EDITION_PROTO2", 998)
|
||||
->value("EDITION_PROTO3", 999)
|
||||
->value("EDITION_2023", 1000)
|
||||
->value("EDITION_2024", 1001)
|
||||
->value("EDITION_UNSTABLE", 9999)
|
||||
->value("EDITION_1_TEST_ONLY", 1)
|
||||
->value("EDITION_2_TEST_ONLY", 2)
|
||||
->value("EDITION_99997_TEST_ONLY", 99997)
|
||||
->value("EDITION_99998_TEST_ONLY", 99998)
|
||||
->value("EDITION_99999_TEST_ONLY", 99999)
|
||||
->value("EDITION_MAX", 2147483647)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->addEnum('google.protobuf.internal.SymbolVisibility', \Google\Protobuf\Internal\SymbolVisibility::class)
|
||||
->value("VISIBILITY_UNSET", 0)
|
||||
->value("VISIBILITY_LOCAL", 1)
|
||||
->value("VISIBILITY_EXPORT", 2)
|
||||
->finalizeToPool();
|
||||
|
||||
$pool->finish();
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/source_context.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class SourceContext
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xF0\x01\x0A\$google/protobuf/source_context.proto\x12\x0Fgoogle.protobuf\"\"\x0A\x0DSourceContext\x12\x11\x0A\x09file_name\x18\x01 \x01(\x09B\x8A\x01\x0A\x13com.google.protobufB\x12SourceContextProtoP\x01Z6google.golang.org/protobuf/types/known/sourcecontextpb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/struct.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Struct
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xFE\x04\x0A\x1Cgoogle/protobuf/struct.proto\x12\x0Fgoogle.protobuf\"\x84\x01\x0A\x06Struct\x123\x0A\x06fields\x18\x01 \x03(\x0B2#.google.protobuf.Struct.FieldsEntry\x1AE\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12%\x0A\x05value\x18\x02 \x01(\x0B2\x16.google.protobuf.Value:\x028\x01\"\xEA\x01\x0A\x05Value\x120\x0A\x0Anull_value\x18\x01 \x01(\x0E2\x1A.google.protobuf.NullValueH\x00\x12\x16\x0A\x0Cnumber_value\x18\x02 \x01(\x01H\x00\x12\x16\x0A\x0Cstring_value\x18\x03 \x01(\x09H\x00\x12\x14\x0A\x0Abool_value\x18\x04 \x01(\x08H\x00\x12/\x0A\x0Cstruct_value\x18\x05 \x01(\x0B2\x17.google.protobuf.StructH\x00\x120\x0A\x0Alist_value\x18\x06 \x01(\x0B2\x1A.google.protobuf.ListValueH\x00B\x06\x0A\x04kind\"3\x0A\x09ListValue\x12&\x0A\x06values\x18\x01 \x03(\x0B2\x16.google.protobuf.Value*\x1B\x0A\x09NullValue\x12\x0E\x0A\x0ANULL_VALUE\x10\x00B\x7F\x0A\x13com.google.protobufB\x0BStructProtoP\x01Z/google.golang.org/protobuf/types/known/structpb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/timestamp.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Timestamp
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xEF\x01\x0A\x1Fgoogle/protobuf/timestamp.proto\x12\x0Fgoogle.protobuf\"+\x0A\x09Timestamp\x12\x0F\x0A\x07seconds\x18\x01 \x01(\x03\x12\x0D\x0A\x05nanos\x18\x02 \x01(\x05B\x85\x01\x0A\x13com.google.protobufB\x0ETimestampProtoP\x01Z2google.golang.org/protobuf/types/known/timestamppb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
27
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
vendored
Normal file
27
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Type
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
\GPBMetadata\Google\Protobuf\Any::initOnce();
|
||||
\GPBMetadata\Google\Protobuf\SourceContext::initOnce();
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xD4\x0C\x0A\x1Agoogle/protobuf/type.proto\x12\x0Fgoogle.protobuf\x1A\$google/protobuf/source_context.proto\"\xE8\x01\x0A\x04Type\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12&\x0A\x06fields\x18\x02 \x03(\x0B2\x16.google.protobuf.Field\x12\x0E\x0A\x06oneofs\x18\x03 \x03(\x09\x12(\x0A\x07options\x18\x04 \x03(\x0B2\x17.google.protobuf.Option\x126\x0A\x0Esource_context\x18\x05 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12'\x0A\x06syntax\x18\x06 \x01(\x0E2\x17.google.protobuf.Syntax\x12\x0F\x0A\x07edition\x18\x07 \x01(\x09\"\xD5\x05\x0A\x05Field\x12)\x0A\x04kind\x18\x01 \x01(\x0E2\x1B.google.protobuf.Field.Kind\x127\x0A\x0Bcardinality\x18\x02 \x01(\x0E2\".google.protobuf.Field.Cardinality\x12\x0E\x0A\x06number\x18\x03 \x01(\x05\x12\x0C\x0A\x04name\x18\x04 \x01(\x09\x12\x10\x0A\x08type_url\x18\x06 \x01(\x09\x12\x13\x0A\x0Boneof_index\x18\x07 \x01(\x05\x12\x0E\x0A\x06packed\x18\x08 \x01(\x08\x12(\x0A\x07options\x18\x09 \x03(\x0B2\x17.google.protobuf.Option\x12\x11\x0A\x09json_name\x18\x0A \x01(\x09\x12\x15\x0A\x0Ddefault_value\x18\x0B \x01(\x09\"\xC8\x02\x0A\x04Kind\x12\x10\x0A\x0CTYPE_UNKNOWN\x10\x00\x12\x0F\x0A\x0BTYPE_DOUBLE\x10\x01\x12\x0E\x0A\x0ATYPE_FLOAT\x10\x02\x12\x0E\x0A\x0ATYPE_INT64\x10\x03\x12\x0F\x0A\x0BTYPE_UINT64\x10\x04\x12\x0E\x0A\x0ATYPE_INT32\x10\x05\x12\x10\x0A\x0CTYPE_FIXED64\x10\x06\x12\x10\x0A\x0CTYPE_FIXED32\x10\x07\x12\x0D\x0A\x09TYPE_BOOL\x10\x08\x12\x0F\x0A\x0BTYPE_STRING\x10\x09\x12\x0E\x0A\x0ATYPE_GROUP\x10\x0A\x12\x10\x0A\x0CTYPE_MESSAGE\x10\x0B\x12\x0E\x0A\x0ATYPE_BYTES\x10\x0C\x12\x0F\x0A\x0BTYPE_UINT32\x10\x0D\x12\x0D\x0A\x09TYPE_ENUM\x10\x0E\x12\x11\x0A\x0DTYPE_SFIXED32\x10\x0F\x12\x11\x0A\x0DTYPE_SFIXED64\x10\x10\x12\x0F\x0A\x0BTYPE_SINT32\x10\x11\x12\x0F\x0A\x0BTYPE_SINT64\x10\x12\"t\x0A\x0BCardinality\x12\x17\x0A\x13CARDINALITY_UNKNOWN\x10\x00\x12\x18\x0A\x14CARDINALITY_OPTIONAL\x10\x01\x12\x18\x0A\x14CARDINALITY_REQUIRED\x10\x02\x12\x18\x0A\x14CARDINALITY_REPEATED\x10\x03\"\xDF\x01\x0A\x04Enum\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12-\x0A\x09enumvalue\x18\x02 \x03(\x0B2\x1A.google.protobuf.EnumValue\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\x126\x0A\x0Esource_context\x18\x04 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12'\x0A\x06syntax\x18\x05 \x01(\x0E2\x17.google.protobuf.Syntax\x12\x0F\x0A\x07edition\x18\x06 \x01(\x09\"S\x0A\x09EnumValue\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0E\x0A\x06number\x18\x02 \x01(\x05\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\";\x0A\x06Option\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.google.protobuf.Any*C\x0A\x06Syntax\x12\x11\x0A\x0DSYNTAX_PROTO2\x10\x00\x12\x11\x0A\x0DSYNTAX_PROTO3\x10\x01\x12\x13\x0A\x0FSYNTAX_EDITIONS\x10\x02B{\x0A\x13com.google.protobufB\x09TypeProtoP\x01Z-google.golang.org/protobuf/types/known/typepb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
vendored
Normal file
25
vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace GPBMetadata\Google\Protobuf;
|
||||
|
||||
class Wrappers
|
||||
{
|
||||
public static $is_initialized = false;
|
||||
|
||||
public static function initOnce() {
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
|
||||
if (static::$is_initialized == true) {
|
||||
return;
|
||||
}
|
||||
$pool->internalAddGeneratedFile(
|
||||
"\x0A\xC7\x03\x0A\x1Egoogle/protobuf/wrappers.proto\x12\x0Fgoogle.protobuf\"\x1C\x0A\x0BDoubleValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x01\"\x1B\x0A\x0AFloatValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x02\"\x1B\x0A\x0AInt64Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x03\"\x1C\x0A\x0BUInt64Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x04\"\x1B\x0A\x0AInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x05\"\x1C\x0A\x0BUInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x0D\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\x1C\x0A\x0BStringValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x09\"\x1B\x0A\x0ABytesValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x0CB\x83\x01\x0A\x13com.google.protobufB\x0DWrappersProtoP\x01Z1google.golang.org/protobuf/types/known/wrapperspb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
|
||||
, true);
|
||||
|
||||
static::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
263
vendor/google/protobuf/src/Google/Protobuf/Any.php
vendored
Normal file
263
vendor/google/protobuf/src/Google/Protobuf/Any.php
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/any.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
||||
* URL that describes the type of the serialized message.
|
||||
* Protobuf library provides support to pack/unpack Any values in the form
|
||||
* of utility functions or additional generated methods of the Any type.
|
||||
* Example 1: Pack and unpack a message in C++.
|
||||
* Foo foo = ...;
|
||||
* Any any;
|
||||
* any.PackFrom(foo);
|
||||
* ...
|
||||
* if (any.UnpackTo(&foo)) {
|
||||
* ...
|
||||
* }
|
||||
* Example 2: Pack and unpack a message in Java.
|
||||
* Foo foo = ...;
|
||||
* Any any = Any.pack(foo);
|
||||
* ...
|
||||
* if (any.is(Foo.class)) {
|
||||
* foo = any.unpack(Foo.class);
|
||||
* }
|
||||
* // or ...
|
||||
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
||||
* foo = any.unpack(Foo.getDefaultInstance());
|
||||
* }
|
||||
* Example 3: Pack and unpack a message in Python.
|
||||
* foo = Foo(...)
|
||||
* any = Any()
|
||||
* any.Pack(foo)
|
||||
* ...
|
||||
* if any.Is(Foo.DESCRIPTOR):
|
||||
* any.Unpack(foo)
|
||||
* ...
|
||||
* Example 4: Pack and unpack a message in Go
|
||||
* foo := &pb.Foo{...}
|
||||
* any, err := anypb.New(foo)
|
||||
* if err != nil {
|
||||
* ...
|
||||
* }
|
||||
* ...
|
||||
* foo := &pb.Foo{}
|
||||
* if err := any.UnmarshalTo(foo); err != nil {
|
||||
* ...
|
||||
* }
|
||||
* The pack methods provided by protobuf library will by default use
|
||||
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
||||
* methods only use the fully qualified type name after the last '/'
|
||||
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
||||
* name "y.z".
|
||||
* JSON
|
||||
* ====
|
||||
* The JSON representation of an `Any` value uses the regular
|
||||
* representation of the deserialized, embedded message, with an
|
||||
* additional field `\@type` which contains the type URL. Example:
|
||||
* package google.profile;
|
||||
* message Person {
|
||||
* string first_name = 1;
|
||||
* string last_name = 2;
|
||||
* }
|
||||
* {
|
||||
* "\@type": "type.googleapis.com/google.profile.Person",
|
||||
* "firstName": <string>,
|
||||
* "lastName": <string>
|
||||
* }
|
||||
* If the embedded message type is well-known and has a custom JSON
|
||||
* representation, that representation will be embedded adding a field
|
||||
* `value` which holds the custom JSON in addition to the `\@type`
|
||||
* field. Example (for message [google.protobuf.Duration][]):
|
||||
* {
|
||||
* "\@type": "type.googleapis.com/google.protobuf.Duration",
|
||||
* "value": "1.212s"
|
||||
* }
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Any</code>
|
||||
*/
|
||||
class Any extends \Google\Protobuf\Internal\AnyBase
|
||||
{
|
||||
/**
|
||||
* A URL/resource name that uniquely identifies the type of the serialized
|
||||
* protocol buffer message. This string must contain at least
|
||||
* one "/" character. The last segment of the URL's path must represent
|
||||
* the fully qualified name of the type (as in
|
||||
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
* (e.g., leading "." is not accepted).
|
||||
* In practice, teams usually precompile into the binary all types that they
|
||||
* expect it to use in the context of Any. However, for URLs which use the
|
||||
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
* server that maps type URLs to message definitions as follows:
|
||||
* * If no scheme is provided, `https` is assumed.
|
||||
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
* value in binary format, or produce an error.
|
||||
* * Applications are allowed to cache lookup results based on the
|
||||
* URL, or have them precompiled into a binary to avoid any
|
||||
* lookup. Therefore, binary compatibility needs to be preserved
|
||||
* on changes to types. (Use versioned type names to manage
|
||||
* breaking changes.)
|
||||
* Note: this functionality is not currently available in the official
|
||||
* protobuf release, and it is not used for type URLs beginning with
|
||||
* type.googleapis.com. As of May 2023, there are no widely used type server
|
||||
* implementations and no plans to implement one.
|
||||
* Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
* used with implementation specific semantics.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 1;</code>
|
||||
*/
|
||||
protected $type_url = '';
|
||||
/**
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 2;</code>
|
||||
*/
|
||||
protected $value = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $type_url
|
||||
* A URL/resource name that uniquely identifies the type of the serialized
|
||||
* protocol buffer message. This string must contain at least
|
||||
* one "/" character. The last segment of the URL's path must represent
|
||||
* the fully qualified name of the type (as in
|
||||
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
* (e.g., leading "." is not accepted).
|
||||
* In practice, teams usually precompile into the binary all types that they
|
||||
* expect it to use in the context of Any. However, for URLs which use the
|
||||
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
* server that maps type URLs to message definitions as follows:
|
||||
* * If no scheme is provided, `https` is assumed.
|
||||
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
* value in binary format, or produce an error.
|
||||
* * Applications are allowed to cache lookup results based on the
|
||||
* URL, or have them precompiled into a binary to avoid any
|
||||
* lookup. Therefore, binary compatibility needs to be preserved
|
||||
* on changes to types. (Use versioned type names to manage
|
||||
* breaking changes.)
|
||||
* Note: this functionality is not currently available in the official
|
||||
* protobuf release, and it is not used for type URLs beginning with
|
||||
* type.googleapis.com. As of May 2023, there are no widely used type server
|
||||
* implementations and no plans to implement one.
|
||||
* Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
* used with implementation specific semantics.
|
||||
* @type string $value
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Any::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* A URL/resource name that uniquely identifies the type of the serialized
|
||||
* protocol buffer message. This string must contain at least
|
||||
* one "/" character. The last segment of the URL's path must represent
|
||||
* the fully qualified name of the type (as in
|
||||
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
* (e.g., leading "." is not accepted).
|
||||
* In practice, teams usually precompile into the binary all types that they
|
||||
* expect it to use in the context of Any. However, for URLs which use the
|
||||
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
* server that maps type URLs to message definitions as follows:
|
||||
* * If no scheme is provided, `https` is assumed.
|
||||
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
* value in binary format, or produce an error.
|
||||
* * Applications are allowed to cache lookup results based on the
|
||||
* URL, or have them precompiled into a binary to avoid any
|
||||
* lookup. Therefore, binary compatibility needs to be preserved
|
||||
* on changes to types. (Use versioned type names to manage
|
||||
* breaking changes.)
|
||||
* Note: this functionality is not currently available in the official
|
||||
* protobuf release, and it is not used for type URLs beginning with
|
||||
* type.googleapis.com. As of May 2023, there are no widely used type server
|
||||
* implementations and no plans to implement one.
|
||||
* Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
* used with implementation specific semantics.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getTypeUrl()
|
||||
{
|
||||
return $this->type_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* A URL/resource name that uniquely identifies the type of the serialized
|
||||
* protocol buffer message. This string must contain at least
|
||||
* one "/" character. The last segment of the URL's path must represent
|
||||
* the fully qualified name of the type (as in
|
||||
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
* (e.g., leading "." is not accepted).
|
||||
* In practice, teams usually precompile into the binary all types that they
|
||||
* expect it to use in the context of Any. However, for URLs which use the
|
||||
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
* server that maps type URLs to message definitions as follows:
|
||||
* * If no scheme is provided, `https` is assumed.
|
||||
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
* value in binary format, or produce an error.
|
||||
* * Applications are allowed to cache lookup results based on the
|
||||
* URL, or have them precompiled into a binary to avoid any
|
||||
* lookup. Therefore, binary compatibility needs to be preserved
|
||||
* on changes to types. (Use versioned type names to manage
|
||||
* breaking changes.)
|
||||
* Note: this functionality is not currently available in the official
|
||||
* protobuf release, and it is not used for type URLs beginning with
|
||||
* type.googleapis.com. As of May 2023, there are no widely used type server
|
||||
* implementations and no plans to implement one.
|
||||
* Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
* used with implementation specific semantics.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setTypeUrl($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->type_url = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Must be a valid serialized protocol buffer of the above specified type.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkString($var, False);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
399
vendor/google/protobuf/src/Google/Protobuf/Api.php
vendored
Normal file
399
vendor/google/protobuf/src/Google/Protobuf/Api.php
vendored
Normal file
@@ -0,0 +1,399 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/api.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Api is a light-weight descriptor for an API Interface.
|
||||
* Interfaces are also described as "protocol buffer services" in some contexts,
|
||||
* such as by the "service" keyword in a .proto file, but they are different
|
||||
* from API Services, which represent a concrete implementation of an interface
|
||||
* as opposed to simply a description of methods and bindings. They are also
|
||||
* sometimes simply referred to as "APIs" in other contexts, such as the name of
|
||||
* this message itself. See https://cloud.google.com/apis/design/glossary for
|
||||
* detailed terminology.
|
||||
* New usages of this message as an alternative to ServiceDescriptorProto are
|
||||
* strongly discouraged. This message does not reliability preserve all
|
||||
* information necessary to model the schema and preserve semantics. Instead
|
||||
* make use of FileDescriptorSet which preserves the necessary information.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Api</code>
|
||||
*/
|
||||
class Api extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The fully qualified name of this interface, including package name
|
||||
* followed by the interface's simple name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
*/
|
||||
protected $name = '';
|
||||
/**
|
||||
* The methods of this interface, in unspecified order.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
|
||||
*/
|
||||
private $methods;
|
||||
/**
|
||||
* Any metadata attached to the interface.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
*/
|
||||
private $options;
|
||||
/**
|
||||
* A version string for this interface. If specified, must have the form
|
||||
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
||||
* omitted, it defaults to zero. If the entire version field is empty, the
|
||||
* major version is derived from the package name, as outlined below. If the
|
||||
* field is not empty, the version in the package name will be verified to be
|
||||
* consistent with what is provided here.
|
||||
* The versioning schema uses [semantic
|
||||
* versioning](http://semver.org) where the major version number
|
||||
* indicates a breaking change and the minor version an additive,
|
||||
* non-breaking change. Both version numbers are signals to users
|
||||
* what to expect from different versions, and should be carefully
|
||||
* chosen based on the product plan.
|
||||
* The major version is also reflected in the package name of the
|
||||
* interface, which must end in `v<major-version>`, as in
|
||||
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
||||
* be omitted. Zero major versions must only be used for
|
||||
* experimental, non-GA interfaces.
|
||||
*
|
||||
* Generated from protobuf field <code>string version = 4;</code>
|
||||
*/
|
||||
protected $version = '';
|
||||
/**
|
||||
* Source context for the protocol buffer service represented by this
|
||||
* message.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
|
||||
*/
|
||||
protected $source_context = null;
|
||||
/**
|
||||
* Included interfaces. See [Mixin][].
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
|
||||
*/
|
||||
private $mixins;
|
||||
/**
|
||||
* The source syntax of the service.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
|
||||
*/
|
||||
protected $syntax = 0;
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 8;</code>
|
||||
*/
|
||||
protected $edition = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* The fully qualified name of this interface, including package name
|
||||
* followed by the interface's simple name.
|
||||
* @type \Google\Protobuf\Method[] $methods
|
||||
* The methods of this interface, in unspecified order.
|
||||
* @type \Google\Protobuf\Option[] $options
|
||||
* Any metadata attached to the interface.
|
||||
* @type string $version
|
||||
* A version string for this interface. If specified, must have the form
|
||||
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
||||
* omitted, it defaults to zero. If the entire version field is empty, the
|
||||
* major version is derived from the package name, as outlined below. If the
|
||||
* field is not empty, the version in the package name will be verified to be
|
||||
* consistent with what is provided here.
|
||||
* The versioning schema uses [semantic
|
||||
* versioning](http://semver.org) where the major version number
|
||||
* indicates a breaking change and the minor version an additive,
|
||||
* non-breaking change. Both version numbers are signals to users
|
||||
* what to expect from different versions, and should be carefully
|
||||
* chosen based on the product plan.
|
||||
* The major version is also reflected in the package name of the
|
||||
* interface, which must end in `v<major-version>`, as in
|
||||
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
||||
* be omitted. Zero major versions must only be used for
|
||||
* experimental, non-GA interfaces.
|
||||
* @type \Google\Protobuf\SourceContext $source_context
|
||||
* Source context for the protocol buffer service represented by this
|
||||
* message.
|
||||
* @type \Google\Protobuf\Mixin[] $mixins
|
||||
* Included interfaces. See [Mixin][].
|
||||
* @type int $syntax
|
||||
* The source syntax of the service.
|
||||
* @type string $edition
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Api::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully qualified name of this interface, including package name
|
||||
* followed by the interface's simple name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully qualified name of this interface, including package name
|
||||
* followed by the interface's simple name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The methods of this interface, in unspecified order.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Method>
|
||||
*/
|
||||
public function getMethods()
|
||||
{
|
||||
return $this->methods;
|
||||
}
|
||||
|
||||
/**
|
||||
* The methods of this interface, in unspecified order.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
|
||||
* @param \Google\Protobuf\Method[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMethods($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
|
||||
$this->methods = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any metadata attached to the interface.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Option>
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any metadata attached to the interface.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @param \Google\Protobuf\Option[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
|
||||
$this->options = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A version string for this interface. If specified, must have the form
|
||||
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
||||
* omitted, it defaults to zero. If the entire version field is empty, the
|
||||
* major version is derived from the package name, as outlined below. If the
|
||||
* field is not empty, the version in the package name will be verified to be
|
||||
* consistent with what is provided here.
|
||||
* The versioning schema uses [semantic
|
||||
* versioning](http://semver.org) where the major version number
|
||||
* indicates a breaking change and the minor version an additive,
|
||||
* non-breaking change. Both version numbers are signals to users
|
||||
* what to expect from different versions, and should be carefully
|
||||
* chosen based on the product plan.
|
||||
* The major version is also reflected in the package name of the
|
||||
* interface, which must end in `v<major-version>`, as in
|
||||
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
||||
* be omitted. Zero major versions must only be used for
|
||||
* experimental, non-GA interfaces.
|
||||
*
|
||||
* Generated from protobuf field <code>string version = 4;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* A version string for this interface. If specified, must have the form
|
||||
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
||||
* omitted, it defaults to zero. If the entire version field is empty, the
|
||||
* major version is derived from the package name, as outlined below. If the
|
||||
* field is not empty, the version in the package name will be verified to be
|
||||
* consistent with what is provided here.
|
||||
* The versioning schema uses [semantic
|
||||
* versioning](http://semver.org) where the major version number
|
||||
* indicates a breaking change and the minor version an additive,
|
||||
* non-breaking change. Both version numbers are signals to users
|
||||
* what to expect from different versions, and should be carefully
|
||||
* chosen based on the product plan.
|
||||
* The major version is also reflected in the package name of the
|
||||
* interface, which must end in `v<major-version>`, as in
|
||||
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
||||
* be omitted. Zero major versions must only be used for
|
||||
* experimental, non-GA interfaces.
|
||||
*
|
||||
* Generated from protobuf field <code>string version = 4;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setVersion($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->version = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Source context for the protocol buffer service represented by this
|
||||
* message.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
|
||||
* @return \Google\Protobuf\SourceContext|null
|
||||
*/
|
||||
public function getSourceContext()
|
||||
{
|
||||
return $this->source_context;
|
||||
}
|
||||
|
||||
public function hasSourceContext()
|
||||
{
|
||||
return isset($this->source_context);
|
||||
}
|
||||
|
||||
public function clearSourceContext()
|
||||
{
|
||||
unset($this->source_context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Source context for the protocol buffer service represented by this
|
||||
* message.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
|
||||
* @param \Google\Protobuf\SourceContext $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSourceContext($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
|
||||
$this->source_context = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Included interfaces. See [Mixin][].
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Mixin>
|
||||
*/
|
||||
public function getMixins()
|
||||
{
|
||||
return $this->mixins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Included interfaces. See [Mixin][].
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
|
||||
* @param \Google\Protobuf\Mixin[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMixins($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class);
|
||||
$this->mixins = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source syntax of the service.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getSyntax()
|
||||
{
|
||||
return $this->syntax;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source syntax of the service.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSyntax($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
|
||||
$this->syntax = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 8;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getEdition()
|
||||
{
|
||||
return $this->edition;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 8;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEdition($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `bool`.
|
||||
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.BoolValue</code>
|
||||
*/
|
||||
class BoolValue extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The bool value.
|
||||
*
|
||||
* Generated from protobuf field <code>bool value = 1;</code>
|
||||
*/
|
||||
protected $value = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type bool $value
|
||||
* The bool value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The bool value.
|
||||
*
|
||||
* Generated from protobuf field <code>bool value = 1;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bool value.
|
||||
*
|
||||
* Generated from protobuf field <code>bool value = 1;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `bytes`.
|
||||
* The JSON representation for `BytesValue` is JSON string.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.BytesValue</code>
|
||||
*/
|
||||
class BytesValue extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The bytes value.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 1;</code>
|
||||
*/
|
||||
protected $value = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $value
|
||||
* The bytes value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The bytes value.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bytes value.
|
||||
*
|
||||
* Generated from protobuf field <code>bytes value = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkString($var, False);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
85
vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
vendored
Normal file
85
vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GetPublicDescriptorTrait;
|
||||
|
||||
class Descriptor
|
||||
{
|
||||
use GetPublicDescriptorTrait;
|
||||
|
||||
private $internal_desc;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __construct($internal_desc)
|
||||
{
|
||||
$this->internal_desc = $internal_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string Full protobuf message name
|
||||
*/
|
||||
public function getFullName()
|
||||
{
|
||||
return trim($this->internal_desc->getFullName(), ".");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string PHP class name
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
return $this->internal_desc->getClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $index Must be >= 0 and < getFieldCount()
|
||||
* @return FieldDescriptor
|
||||
*/
|
||||
public function getField($index)
|
||||
{
|
||||
return $this->getPublicDescriptor($this->internal_desc->getFieldByIndex($index));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Number of fields in message
|
||||
*/
|
||||
public function getFieldCount()
|
||||
{
|
||||
return count($this->internal_desc->getField());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $index Must be >= 0 and < getOneofDeclCount()
|
||||
* @return OneofDescriptor
|
||||
*/
|
||||
public function getOneofDecl($index)
|
||||
{
|
||||
return $this->getPublicDescriptor($this->internal_desc->getOneofDecl()[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Number of oneofs in message
|
||||
*/
|
||||
public function getOneofDeclCount()
|
||||
{
|
||||
return count($this->internal_desc->getOneofDecl());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Number of real oneofs in message
|
||||
*/
|
||||
public function getRealOneofDeclCount()
|
||||
{
|
||||
return $this->internal_desc->getRealOneofDeclCount();
|
||||
}
|
||||
}
|
||||
53
vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
vendored
Normal file
53
vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
class DescriptorPool
|
||||
{
|
||||
private static $pool;
|
||||
|
||||
private $internal_pool;
|
||||
|
||||
/**
|
||||
* @return DescriptorPool
|
||||
*/
|
||||
public static function getGeneratedPool()
|
||||
{
|
||||
if (!isset(self::$pool)) {
|
||||
self::$pool = new DescriptorPool(\Google\Protobuf\Internal\DescriptorPool::getGeneratedPool());
|
||||
}
|
||||
return self::$pool;
|
||||
}
|
||||
|
||||
private function __construct($internal_pool)
|
||||
{
|
||||
$this->internal_pool = $internal_pool;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className A fully qualified protobuf class name
|
||||
* @return Descriptor
|
||||
*/
|
||||
public function getDescriptorByClassName($className)
|
||||
{
|
||||
$desc = $this->internal_pool->getDescriptorByClassName($className);
|
||||
return is_null($desc) ? null : $desc->getPublicDescriptor();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className A fully qualified protobuf class name
|
||||
* @return EnumDescriptor
|
||||
*/
|
||||
public function getEnumDescriptorByClassName($className)
|
||||
{
|
||||
$desc = $this->internal_pool->getEnumDescriptorByClassName($className);
|
||||
return is_null($desc) ? null : $desc->getPublicDescriptor();
|
||||
}
|
||||
}
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `double`.
|
||||
* The JSON representation for `DoubleValue` is JSON number.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.DoubleValue</code>
|
||||
*/
|
||||
class DoubleValue extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The double value.
|
||||
*
|
||||
* Generated from protobuf field <code>double value = 1;</code>
|
||||
*/
|
||||
protected $value = 0.0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type float $value
|
||||
* The double value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The double value.
|
||||
*
|
||||
* Generated from protobuf field <code>double value = 1;</code>
|
||||
* @return float
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The double value.
|
||||
*
|
||||
* Generated from protobuf field <code>double value = 1;</code>
|
||||
* @param float $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkDouble($var);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
174
vendor/google/protobuf/src/Google/Protobuf/Duration.php
vendored
Normal file
174
vendor/google/protobuf/src/Google/Protobuf/Duration.php
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/duration.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* A Duration represents a signed, fixed-length span of time represented
|
||||
* as a count of seconds and fractions of seconds at nanosecond
|
||||
* resolution. It is independent of any calendar and concepts like "day"
|
||||
* or "month". It is related to Timestamp in that the difference between
|
||||
* two Timestamp values is a Duration and it can be added or subtracted
|
||||
* from a Timestamp. Range is approximately +-10,000 years.
|
||||
* # Examples
|
||||
* Example 1: Compute Duration from two Timestamps in pseudo code.
|
||||
* Timestamp start = ...;
|
||||
* Timestamp end = ...;
|
||||
* Duration duration = ...;
|
||||
* duration.seconds = end.seconds - start.seconds;
|
||||
* duration.nanos = end.nanos - start.nanos;
|
||||
* if (duration.seconds < 0 && duration.nanos > 0) {
|
||||
* duration.seconds += 1;
|
||||
* duration.nanos -= 1000000000;
|
||||
* } else if (duration.seconds > 0 && duration.nanos < 0) {
|
||||
* duration.seconds -= 1;
|
||||
* duration.nanos += 1000000000;
|
||||
* }
|
||||
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
||||
* Timestamp start = ...;
|
||||
* Duration duration = ...;
|
||||
* Timestamp end = ...;
|
||||
* end.seconds = start.seconds + duration.seconds;
|
||||
* end.nanos = start.nanos + duration.nanos;
|
||||
* if (end.nanos < 0) {
|
||||
* end.seconds -= 1;
|
||||
* end.nanos += 1000000000;
|
||||
* } else if (end.nanos >= 1000000000) {
|
||||
* end.seconds += 1;
|
||||
* end.nanos -= 1000000000;
|
||||
* }
|
||||
* Example 3: Compute Duration from datetime.timedelta in Python.
|
||||
* td = datetime.timedelta(days=3, minutes=10)
|
||||
* duration = Duration()
|
||||
* duration.FromTimedelta(td)
|
||||
* # JSON Mapping
|
||||
* In JSON format, the Duration type is encoded as a string rather than an
|
||||
* object, where the string ends in the suffix "s" (indicating seconds) and
|
||||
* is preceded by the number of seconds, with nanoseconds expressed as
|
||||
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
||||
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
||||
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
||||
* microsecond should be expressed in JSON format as "3.000001s".
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Duration</code>
|
||||
*/
|
||||
class Duration extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
*
|
||||
* Generated from protobuf field <code>int64 seconds = 1;</code>
|
||||
*/
|
||||
protected $seconds = 0;
|
||||
/**
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 nanos = 2;</code>
|
||||
*/
|
||||
protected $nanos = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int|string $seconds
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
* @type int $nanos
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Duration::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
*
|
||||
* Generated from protobuf field <code>int64 seconds = 1;</code>
|
||||
* @return int|string
|
||||
*/
|
||||
public function getSeconds()
|
||||
{
|
||||
return $this->seconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
||||
*
|
||||
* Generated from protobuf field <code>int64 seconds = 1;</code>
|
||||
* @param int|string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSeconds($var)
|
||||
{
|
||||
GPBUtil::checkInt64($var);
|
||||
$this->seconds = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 nanos = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNanos()
|
||||
{
|
||||
return $this->nanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signed fractions of a second at nanosecond resolution of the span
|
||||
* of time. Durations less than one second are represented with a 0
|
||||
* `seconds` field and a positive or negative `nanos` field. For durations
|
||||
* of one second or more, a non-zero value for the `nanos` field must be
|
||||
* of the same sign as the `seconds` field. Must be from -999,999,999
|
||||
* to +999,999,999 inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 nanos = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNanos($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->nanos = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
252
vendor/google/protobuf/src/Google/Protobuf/Enum.php
vendored
Normal file
252
vendor/google/protobuf/src/Google/Protobuf/Enum.php
vendored
Normal file
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Enum type definition.
|
||||
* New usages of this message as an alternative to EnumDescriptorProto are
|
||||
* strongly discouraged. This message does not reliability preserve all
|
||||
* information necessary to model the schema and preserve semantics. Instead
|
||||
* make use of FileDescriptorSet which preserves the necessary information.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Enum</code>
|
||||
*/
|
||||
class Enum extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Enum type name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
*/
|
||||
protected $name = '';
|
||||
/**
|
||||
* Enum value definitions.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
|
||||
*/
|
||||
private $enumvalue;
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
*/
|
||||
private $options;
|
||||
/**
|
||||
* The source context.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
|
||||
*/
|
||||
protected $source_context = null;
|
||||
/**
|
||||
* The source syntax.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
|
||||
*/
|
||||
protected $syntax = 0;
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 6;</code>
|
||||
*/
|
||||
protected $edition = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* Enum type name.
|
||||
* @type \Google\Protobuf\EnumValue[] $enumvalue
|
||||
* Enum value definitions.
|
||||
* @type \Google\Protobuf\Option[] $options
|
||||
* Protocol buffer options.
|
||||
* @type \Google\Protobuf\SourceContext $source_context
|
||||
* The source context.
|
||||
* @type int $syntax
|
||||
* The source syntax.
|
||||
* @type string $edition
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Type::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum type name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum type name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value definitions.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\EnumValue>
|
||||
*/
|
||||
public function getEnumvalue()
|
||||
{
|
||||
return $this->enumvalue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value definitions.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
|
||||
* @param \Google\Protobuf\EnumValue[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnumvalue($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\EnumValue::class);
|
||||
$this->enumvalue = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Option>
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @param \Google\Protobuf\Option[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
|
||||
$this->options = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source context.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
|
||||
* @return \Google\Protobuf\SourceContext|null
|
||||
*/
|
||||
public function getSourceContext()
|
||||
{
|
||||
return $this->source_context;
|
||||
}
|
||||
|
||||
public function hasSourceContext()
|
||||
{
|
||||
return isset($this->source_context);
|
||||
}
|
||||
|
||||
public function clearSourceContext()
|
||||
{
|
||||
unset($this->source_context);
|
||||
}
|
||||
|
||||
/**
|
||||
* The source context.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
|
||||
* @param \Google\Protobuf\SourceContext $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSourceContext($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
|
||||
$this->source_context = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source syntax.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getSyntax()
|
||||
{
|
||||
return $this->syntax;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source syntax.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSyntax($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
|
||||
$this->syntax = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 6;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getEdition()
|
||||
{
|
||||
return $this->edition;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
||||
*
|
||||
* Generated from protobuf field <code>string edition = 6;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEdition($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
56
vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
vendored
Normal file
56
vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
class EnumDescriptor
|
||||
{
|
||||
private $internal_desc;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __construct($internal_desc)
|
||||
{
|
||||
$this->internal_desc = $internal_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string Full protobuf message name
|
||||
*/
|
||||
public function getFullName()
|
||||
{
|
||||
return $this->internal_desc->getFullName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string PHP class name
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
return $this->internal_desc->getClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $index Must be >= 0 and < getValueCount()
|
||||
* @return EnumValueDescriptor
|
||||
*/
|
||||
public function getValue($index)
|
||||
{
|
||||
return $this->internal_desc->getValueDescriptorByIndex($index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Number of values in enum
|
||||
*/
|
||||
public function getValueCount()
|
||||
{
|
||||
return $this->internal_desc->getValueCount();
|
||||
}
|
||||
}
|
||||
140
vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
vendored
Normal file
140
vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Enum value definition.
|
||||
* New usages of this message as an alternative to EnumValueDescriptorProto are
|
||||
* strongly discouraged. This message does not reliability preserve all
|
||||
* information necessary to model the schema and preserve semantics. Instead
|
||||
* make use of FileDescriptorSet which preserves the necessary information.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.EnumValue</code>
|
||||
*/
|
||||
class EnumValue extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Enum value name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
*/
|
||||
protected $name = '';
|
||||
/**
|
||||
* Enum value number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 2;</code>
|
||||
*/
|
||||
protected $number = 0;
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* Enum value name.
|
||||
* @type int $number
|
||||
* Enum value number.
|
||||
* @type \Google\Protobuf\Option[] $options
|
||||
* Protocol buffer options.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Type::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum value number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->number = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Option>
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
|
||||
* @param \Google\Protobuf\Option[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
|
||||
$this->options = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
41
vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
vendored
Normal file
41
vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
class EnumValueDescriptor
|
||||
{
|
||||
private $name;
|
||||
private $number;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __construct($name, $number)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->number = $number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
}
|
||||
386
vendor/google/protobuf/src/Google/Protobuf/Field.php
vendored
Normal file
386
vendor/google/protobuf/src/Google/Protobuf/Field.php
vendored
Normal file
@@ -0,0 +1,386 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* A single field of a message type.
|
||||
* New usages of this message as an alternative to FieldDescriptorProto are
|
||||
* strongly discouraged. This message does not reliability preserve all
|
||||
* information necessary to model the schema and preserve semantics. Instead
|
||||
* make use of FileDescriptorSet which preserves the necessary information.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Field</code>
|
||||
*/
|
||||
class Field extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The field type.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
|
||||
*/
|
||||
protected $kind = 0;
|
||||
/**
|
||||
* The field cardinality.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
|
||||
*/
|
||||
protected $cardinality = 0;
|
||||
/**
|
||||
* The field number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 3;</code>
|
||||
*/
|
||||
protected $number = 0;
|
||||
/**
|
||||
* The field name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 4;</code>
|
||||
*/
|
||||
protected $name = '';
|
||||
/**
|
||||
* The field type URL, without the scheme, for message or enumeration
|
||||
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 6;</code>
|
||||
*/
|
||||
protected $type_url = '';
|
||||
/**
|
||||
* The index of the field type in `Type.oneofs`, for message or enumeration
|
||||
* types. The first type has index 1; zero means the type is not in the list.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
|
||||
*/
|
||||
protected $oneof_index = 0;
|
||||
/**
|
||||
* Whether to use alternative packed wire representation.
|
||||
*
|
||||
* Generated from protobuf field <code>bool packed = 8;</code>
|
||||
*/
|
||||
protected $packed = false;
|
||||
/**
|
||||
* The protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
|
||||
*/
|
||||
private $options;
|
||||
/**
|
||||
* The field JSON name.
|
||||
*
|
||||
* Generated from protobuf field <code>string json_name = 10;</code>
|
||||
*/
|
||||
protected $json_name = '';
|
||||
/**
|
||||
* The string value of the default value of this field. Proto2 syntax only.
|
||||
*
|
||||
* Generated from protobuf field <code>string default_value = 11;</code>
|
||||
*/
|
||||
protected $default_value = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $kind
|
||||
* The field type.
|
||||
* @type int $cardinality
|
||||
* The field cardinality.
|
||||
* @type int $number
|
||||
* The field number.
|
||||
* @type string $name
|
||||
* The field name.
|
||||
* @type string $type_url
|
||||
* The field type URL, without the scheme, for message or enumeration
|
||||
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
||||
* @type int $oneof_index
|
||||
* The index of the field type in `Type.oneofs`, for message or enumeration
|
||||
* types. The first type has index 1; zero means the type is not in the list.
|
||||
* @type bool $packed
|
||||
* Whether to use alternative packed wire representation.
|
||||
* @type \Google\Protobuf\Option[] $options
|
||||
* The protocol buffer options.
|
||||
* @type string $json_name
|
||||
* The field JSON name.
|
||||
* @type string $default_value
|
||||
* The string value of the default value of this field. Proto2 syntax only.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Type::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The field type.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getKind()
|
||||
{
|
||||
return $this->kind;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field type.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setKind($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Field\Kind::class);
|
||||
$this->kind = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field cardinality.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getCardinality()
|
||||
{
|
||||
return $this->cardinality;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field cardinality.
|
||||
*
|
||||
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setCardinality($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Field\Cardinality::class);
|
||||
$this->cardinality = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 3;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field number.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 number = 3;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->number = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 4;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field name.
|
||||
*
|
||||
* Generated from protobuf field <code>string name = 4;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field type URL, without the scheme, for message or enumeration
|
||||
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 6;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getTypeUrl()
|
||||
{
|
||||
return $this->type_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field type URL, without the scheme, for message or enumeration
|
||||
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
||||
*
|
||||
* Generated from protobuf field <code>string type_url = 6;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setTypeUrl($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->type_url = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The index of the field type in `Type.oneofs`, for message or enumeration
|
||||
* types. The first type has index 1; zero means the type is not in the list.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getOneofIndex()
|
||||
{
|
||||
return $this->oneof_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* The index of the field type in `Type.oneofs`, for message or enumeration
|
||||
* types. The first type has index 1; zero means the type is not in the list.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOneofIndex($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->oneof_index = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to use alternative packed wire representation.
|
||||
*
|
||||
* Generated from protobuf field <code>bool packed = 8;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getPacked()
|
||||
{
|
||||
return $this->packed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to use alternative packed wire representation.
|
||||
*
|
||||
* Generated from protobuf field <code>bool packed = 8;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPacked($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->packed = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Option>
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* The protocol buffer options.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
|
||||
* @param \Google\Protobuf\Option[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
|
||||
$this->options = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field JSON name.
|
||||
*
|
||||
* Generated from protobuf field <code>string json_name = 10;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getJsonName()
|
||||
{
|
||||
return $this->json_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field JSON name.
|
||||
*
|
||||
* Generated from protobuf field <code>string json_name = 10;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setJsonName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->json_name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The string value of the default value of this field. Proto2 syntax only.
|
||||
*
|
||||
* Generated from protobuf field <code>string default_value = 11;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultValue()
|
||||
{
|
||||
return $this->default_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The string value of the default value of this field. Proto2 syntax only.
|
||||
*
|
||||
* Generated from protobuf field <code>string default_value = 11;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultValue($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->default_value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
69
vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
vendored
Normal file
69
vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf\Field;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Whether a field is optional, required, or repeated.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.Field.Cardinality</code>
|
||||
*/
|
||||
class Cardinality
|
||||
{
|
||||
/**
|
||||
* For fields with unknown cardinality.
|
||||
*
|
||||
* Generated from protobuf enum <code>CARDINALITY_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const CARDINALITY_UNKNOWN = 0;
|
||||
/**
|
||||
* For optional fields.
|
||||
*
|
||||
* Generated from protobuf enum <code>CARDINALITY_OPTIONAL = 1;</code>
|
||||
*/
|
||||
const CARDINALITY_OPTIONAL = 1;
|
||||
/**
|
||||
* For required fields. Proto2 syntax only.
|
||||
*
|
||||
* Generated from protobuf enum <code>CARDINALITY_REQUIRED = 2;</code>
|
||||
*/
|
||||
const CARDINALITY_REQUIRED = 2;
|
||||
/**
|
||||
* For repeated fields.
|
||||
*
|
||||
* Generated from protobuf enum <code>CARDINALITY_REPEATED = 3;</code>
|
||||
*/
|
||||
const CARDINALITY_REPEATED = 3;
|
||||
|
||||
private static $valueToName = [
|
||||
self::CARDINALITY_UNKNOWN => 'CARDINALITY_UNKNOWN',
|
||||
self::CARDINALITY_OPTIONAL => 'CARDINALITY_OPTIONAL',
|
||||
self::CARDINALITY_REQUIRED => 'CARDINALITY_REQUIRED',
|
||||
self::CARDINALITY_REPEATED => 'CARDINALITY_REPEATED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
174
vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
vendored
Normal file
174
vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf\Field;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Basic field types.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.Field.Kind</code>
|
||||
*/
|
||||
class Kind
|
||||
{
|
||||
/**
|
||||
* Field type unknown.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const TYPE_UNKNOWN = 0;
|
||||
/**
|
||||
* Field type double.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
|
||||
*/
|
||||
const TYPE_DOUBLE = 1;
|
||||
/**
|
||||
* Field type float.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
|
||||
*/
|
||||
const TYPE_FLOAT = 2;
|
||||
/**
|
||||
* Field type int64.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
|
||||
*/
|
||||
const TYPE_INT64 = 3;
|
||||
/**
|
||||
* Field type uint64.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
|
||||
*/
|
||||
const TYPE_UINT64 = 4;
|
||||
/**
|
||||
* Field type int32.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
|
||||
*/
|
||||
const TYPE_INT32 = 5;
|
||||
/**
|
||||
* Field type fixed64.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
|
||||
*/
|
||||
const TYPE_FIXED64 = 6;
|
||||
/**
|
||||
* Field type fixed32.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
|
||||
*/
|
||||
const TYPE_FIXED32 = 7;
|
||||
/**
|
||||
* Field type bool.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
|
||||
*/
|
||||
const TYPE_BOOL = 8;
|
||||
/**
|
||||
* Field type string.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_STRING = 9;</code>
|
||||
*/
|
||||
const TYPE_STRING = 9;
|
||||
/**
|
||||
* Field type group. Proto2 syntax only, and deprecated.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
|
||||
*/
|
||||
const TYPE_GROUP = 10;
|
||||
/**
|
||||
* Field type message.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
|
||||
*/
|
||||
const TYPE_MESSAGE = 11;
|
||||
/**
|
||||
* Field type bytes.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
|
||||
*/
|
||||
const TYPE_BYTES = 12;
|
||||
/**
|
||||
* Field type uint32.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
|
||||
*/
|
||||
const TYPE_UINT32 = 13;
|
||||
/**
|
||||
* Field type enum.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
|
||||
*/
|
||||
const TYPE_ENUM = 14;
|
||||
/**
|
||||
* Field type sfixed32.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
|
||||
*/
|
||||
const TYPE_SFIXED32 = 15;
|
||||
/**
|
||||
* Field type sfixed64.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
|
||||
*/
|
||||
const TYPE_SFIXED64 = 16;
|
||||
/**
|
||||
* Field type sint32.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
|
||||
*/
|
||||
const TYPE_SINT32 = 17;
|
||||
/**
|
||||
* Field type sint64.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
|
||||
*/
|
||||
const TYPE_SINT64 = 18;
|
||||
|
||||
private static $valueToName = [
|
||||
self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
|
||||
self::TYPE_DOUBLE => 'TYPE_DOUBLE',
|
||||
self::TYPE_FLOAT => 'TYPE_FLOAT',
|
||||
self::TYPE_INT64 => 'TYPE_INT64',
|
||||
self::TYPE_UINT64 => 'TYPE_UINT64',
|
||||
self::TYPE_INT32 => 'TYPE_INT32',
|
||||
self::TYPE_FIXED64 => 'TYPE_FIXED64',
|
||||
self::TYPE_FIXED32 => 'TYPE_FIXED32',
|
||||
self::TYPE_BOOL => 'TYPE_BOOL',
|
||||
self::TYPE_STRING => 'TYPE_STRING',
|
||||
self::TYPE_GROUP => 'TYPE_GROUP',
|
||||
self::TYPE_MESSAGE => 'TYPE_MESSAGE',
|
||||
self::TYPE_BYTES => 'TYPE_BYTES',
|
||||
self::TYPE_UINT32 => 'TYPE_UINT32',
|
||||
self::TYPE_ENUM => 'TYPE_ENUM',
|
||||
self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
|
||||
self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
|
||||
self::TYPE_SINT32 => 'TYPE_SINT32',
|
||||
self::TYPE_SINT64 => 'TYPE_SINT64',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
139
vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
vendored
Normal file
139
vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GetPublicDescriptorTrait;
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
|
||||
class FieldDescriptor
|
||||
{
|
||||
use GetPublicDescriptorTrait;
|
||||
|
||||
/** @var \Google\Protobuf\Internal\FieldDescriptor $internal_desc */
|
||||
private $internal_desc;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __construct($internal_desc)
|
||||
{
|
||||
$this->internal_desc = $internal_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string Field name
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->internal_desc->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Protobuf field number
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->internal_desc->getNumber();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use isRepeated() or isRequired() instead.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->internal_desc->getLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRequired()
|
||||
{
|
||||
return $this->internal_desc->isRequired();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRepeated()
|
||||
{
|
||||
return $this->internal_desc->isRepeated();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->internal_desc->getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return OneofDescriptor
|
||||
*/
|
||||
public function getContainingOneof()
|
||||
{
|
||||
return $this->getPublicDescriptor($this->internal_desc->getContainingOneof());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the field's containing oneof, only if non-synthetic.
|
||||
*
|
||||
* @return null|OneofDescriptor
|
||||
*/
|
||||
public function getRealContainingOneof()
|
||||
{
|
||||
return $this->getPublicDescriptor($this->internal_desc->getRealContainingOneof());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasOptionalKeyword()
|
||||
{
|
||||
return $this->internal_desc->hasOptionalKeyword();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Descriptor Returns a descriptor for the field type if the field type is a message, otherwise throws \Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getMessageType()
|
||||
{
|
||||
if ($this->getType() == GPBType::MESSAGE) {
|
||||
return $this->getPublicDescriptor($this->internal_desc->getMessageType());
|
||||
} else {
|
||||
throw new \Exception("Cannot get message type for non-message field '" . $this->getName() . "'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EnumDescriptor Returns an enum descriptor if the field type is an enum, otherwise throws \Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getEnumType()
|
||||
{
|
||||
if ($this->getType() == GPBType::ENUM) {
|
||||
return $this->getPublicDescriptor($this->internal_desc->getEnumType());
|
||||
} else {
|
||||
throw new \Exception("Cannot get enum type for non-enum field '" . $this->getName() . "'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isMap()
|
||||
{
|
||||
return $this->internal_desc->isMap();
|
||||
}
|
||||
}
|
||||
218
vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
vendored
Normal file
218
vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/field_mask.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* `FieldMask` represents a set of symbolic field paths, for example:
|
||||
* paths: "f.a"
|
||||
* paths: "f.b.d"
|
||||
* Here `f` represents a field in some root message, `a` and `b`
|
||||
* fields in the message found in `f`, and `d` a field found in the
|
||||
* message in `f.b`.
|
||||
* Field masks are used to specify a subset of fields that should be
|
||||
* returned by a get operation or modified by an update operation.
|
||||
* Field masks also have a custom JSON encoding (see below).
|
||||
* # Field Masks in Projections
|
||||
* When used in the context of a projection, a response message or
|
||||
* sub-message is filtered by the API to only contain those fields as
|
||||
* specified in the mask. For example, if the mask in the previous
|
||||
* example is applied to a response message as follows:
|
||||
* f {
|
||||
* a : 22
|
||||
* b {
|
||||
* d : 1
|
||||
* x : 2
|
||||
* }
|
||||
* y : 13
|
||||
* }
|
||||
* z: 8
|
||||
* The result will not contain specific values for fields x,y and z
|
||||
* (their value will be set to the default, and omitted in proto text
|
||||
* output):
|
||||
* f {
|
||||
* a : 22
|
||||
* b {
|
||||
* d : 1
|
||||
* }
|
||||
* }
|
||||
* A repeated field is not allowed except at the last position of a
|
||||
* paths string.
|
||||
* If a FieldMask object is not present in a get operation, the
|
||||
* operation applies to all fields (as if a FieldMask of all fields
|
||||
* had been specified).
|
||||
* Note that a field mask does not necessarily apply to the
|
||||
* top-level response message. In case of a REST get operation, the
|
||||
* field mask applies directly to the response, but in case of a REST
|
||||
* list operation, the mask instead applies to each individual message
|
||||
* in the returned resource list. In case of a REST custom method,
|
||||
* other definitions may be used. Where the mask applies will be
|
||||
* clearly documented together with its declaration in the API. In
|
||||
* any case, the effect on the returned resource/resources is required
|
||||
* behavior for APIs.
|
||||
* # Field Masks in Update Operations
|
||||
* A field mask in update operations specifies which fields of the
|
||||
* targeted resource are going to be updated. The API is required
|
||||
* to only change the values of the fields as specified in the mask
|
||||
* and leave the others untouched. If a resource is passed in to
|
||||
* describe the updated values, the API ignores the values of all
|
||||
* fields not covered by the mask.
|
||||
* If a repeated field is specified for an update operation, new values will
|
||||
* be appended to the existing repeated field in the target resource. Note that
|
||||
* a repeated field is only allowed in the last position of a `paths` string.
|
||||
* If a sub-message is specified in the last position of the field mask for an
|
||||
* update operation, then new value will be merged into the existing sub-message
|
||||
* in the target resource.
|
||||
* For example, given the target message:
|
||||
* f {
|
||||
* b {
|
||||
* d: 1
|
||||
* x: 2
|
||||
* }
|
||||
* c: [1]
|
||||
* }
|
||||
* And an update message:
|
||||
* f {
|
||||
* b {
|
||||
* d: 10
|
||||
* }
|
||||
* c: [2]
|
||||
* }
|
||||
* then if the field mask is:
|
||||
* paths: ["f.b", "f.c"]
|
||||
* then the result will be:
|
||||
* f {
|
||||
* b {
|
||||
* d: 10
|
||||
* x: 2
|
||||
* }
|
||||
* c: [1, 2]
|
||||
* }
|
||||
* An implementation may provide options to override this default behavior for
|
||||
* repeated and message fields.
|
||||
* In order to reset a field's value to the default, the field must
|
||||
* be in the mask and set to the default value in the provided resource.
|
||||
* Hence, in order to reset all fields of a resource, provide a default
|
||||
* instance of the resource and set all fields in the mask, or do
|
||||
* not provide a mask as described below.
|
||||
* If a field mask is not present on update, the operation applies to
|
||||
* all fields (as if a field mask of all fields has been specified).
|
||||
* Note that in the presence of schema evolution, this may mean that
|
||||
* fields the client does not know and has therefore not filled into
|
||||
* the request will be reset to their default. If this is unwanted
|
||||
* behavior, a specific service may require a client to always specify
|
||||
* a field mask, producing an error if not.
|
||||
* As with get operations, the location of the resource which
|
||||
* describes the updated values in the request message depends on the
|
||||
* operation kind. In any case, the effect of the field mask is
|
||||
* required to be honored by the API.
|
||||
* ## Considerations for HTTP REST
|
||||
* The HTTP kind of an update operation which uses a field mask must
|
||||
* be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
||||
* (PUT must only be used for full updates).
|
||||
* # JSON Encoding of Field Masks
|
||||
* In JSON, a field mask is encoded as a single string where paths are
|
||||
* separated by a comma. Fields name in each path are converted
|
||||
* to/from lower-camel naming conventions.
|
||||
* As an example, consider the following message declarations:
|
||||
* message Profile {
|
||||
* User user = 1;
|
||||
* Photo photo = 2;
|
||||
* }
|
||||
* message User {
|
||||
* string display_name = 1;
|
||||
* string address = 2;
|
||||
* }
|
||||
* In proto a field mask for `Profile` may look as such:
|
||||
* mask {
|
||||
* paths: "user.display_name"
|
||||
* paths: "photo"
|
||||
* }
|
||||
* In JSON, the same mask is represented as below:
|
||||
* {
|
||||
* mask: "user.displayName,photo"
|
||||
* }
|
||||
* # Field Masks and Oneof Fields
|
||||
* Field masks treat fields in oneofs just as regular fields. Consider the
|
||||
* following message:
|
||||
* message SampleMessage {
|
||||
* oneof test_oneof {
|
||||
* string name = 4;
|
||||
* SubMessage sub_message = 9;
|
||||
* }
|
||||
* }
|
||||
* The field mask can be:
|
||||
* mask {
|
||||
* paths: "name"
|
||||
* }
|
||||
* Or:
|
||||
* mask {
|
||||
* paths: "sub_message"
|
||||
* }
|
||||
* Note that oneof type names ("test_oneof" in this case) cannot be used in
|
||||
* paths.
|
||||
* ## Field Mask Verification
|
||||
* The implementation of any API method which has a FieldMask type field in the
|
||||
* request should verify the included field paths, and return an
|
||||
* `INVALID_ARGUMENT` error if any path is unmappable.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FieldMask</code>
|
||||
*/
|
||||
class FieldMask extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The set of field mask paths.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string paths = 1;</code>
|
||||
*/
|
||||
private $paths;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string[] $paths
|
||||
* The set of field mask paths.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\FieldMask::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of field mask paths.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string paths = 1;</code>
|
||||
* @return RepeatedField<string>
|
||||
*/
|
||||
public function getPaths()
|
||||
{
|
||||
return $this->paths;
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of field mask paths.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string paths = 1;</code>
|
||||
* @param string[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaths($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
|
||||
$this->paths = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
16
vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
vendored
Normal file
16
vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
if (false) {
|
||||
/**
|
||||
* This class is deprecated. Use Google\Protobuf\Field\Cardinality instead.
|
||||
* @deprecated
|
||||
*/
|
||||
class Field_Cardinality {}
|
||||
}
|
||||
class_exists(Field\Cardinality::class);
|
||||
@trigger_error('Google\Protobuf\Field_Cardinality is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Cardinality instead', E_USER_DEPRECATED);
|
||||
|
||||
16
vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
vendored
Normal file
16
vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: google/protobuf/type.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
if (false) {
|
||||
/**
|
||||
* This class is deprecated. Use Google\Protobuf\Field\Kind instead.
|
||||
* @deprecated
|
||||
*/
|
||||
class Field_Kind {}
|
||||
}
|
||||
class_exists(Field\Kind::class);
|
||||
@trigger_error('Google\Protobuf\Field_Kind is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Kind instead', E_USER_DEPRECATED);
|
||||
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `float`.
|
||||
* The JSON representation for `FloatValue` is JSON number.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FloatValue</code>
|
||||
*/
|
||||
class FloatValue extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The float value.
|
||||
*
|
||||
* Generated from protobuf field <code>float value = 1;</code>
|
||||
*/
|
||||
protected $value = 0.0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type float $value
|
||||
* The float value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The float value.
|
||||
*
|
||||
* Generated from protobuf field <code>float value = 1;</code>
|
||||
* @return float
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The float value.
|
||||
*
|
||||
* Generated from protobuf field <code>float value = 1;</code>
|
||||
* @param float $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkFloat($var);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
39
vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
vendored
Normal file
39
vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/empty.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* A generic empty message that you can re-use to avoid defining duplicated
|
||||
* empty messages in your APIs. A typical example is to use it as the request
|
||||
* or the response type of an API method. For instance:
|
||||
* service Foo {
|
||||
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
* }
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Empty</code>
|
||||
*/
|
||||
class GPBEmpty extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\GPBEmpty::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `int32`.
|
||||
* The JSON representation for `Int32Value` is JSON number.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Int32Value</code>
|
||||
*/
|
||||
class Int32Value extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The int32 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 value = 1;</code>
|
||||
*/
|
||||
protected $value = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $value
|
||||
* The int32 value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The int32 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 value = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The int32 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int32 value = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
71
vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
vendored
Normal file
71
vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/wrappers.proto
|
||||
|
||||
namespace Google\Protobuf;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Wrapper message for `int64`.
|
||||
* The JSON representation for `Int64Value` is JSON string.
|
||||
* Not recommended for use in new APIs, but still useful for legacy APIs and
|
||||
* has no plan to be removed.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.Int64Value</code>
|
||||
*/
|
||||
class Int64Value extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The int64 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int64 value = 1;</code>
|
||||
*/
|
||||
protected $value = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int|string $value
|
||||
* The int64 value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The int64 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int64 value = 1;</code>
|
||||
* @return int|string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The int64 value.
|
||||
*
|
||||
* Generated from protobuf field <code>int64 value = 1;</code>
|
||||
* @param int|string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkInt64($var);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
86
vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
vendored
Normal file
86
vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
/**
|
||||
* Base class for Google\Protobuf\Any, this contains hand-written convenience
|
||||
* methods like pack() and unpack().
|
||||
*/
|
||||
class AnyBase extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
const TYPE_URL_PREFIX = 'type.googleapis.com/';
|
||||
|
||||
/**
|
||||
* This method will try to resolve the type_url in Any message to get the
|
||||
* targeted message type. If failed, an error will be thrown. Otherwise,
|
||||
* the method will create a message of the targeted type and fill it with
|
||||
* the decoded value in Any.
|
||||
* @return Message unpacked message
|
||||
* @throws \Exception Type url needs to be type.googleapis.com/fully-qualified.
|
||||
* @throws \Exception Class hasn't been added to descriptor pool.
|
||||
* @throws \Exception cannot decode data in value field.
|
||||
*/
|
||||
public function unpack()
|
||||
{
|
||||
// Get fully qualified name from type url.
|
||||
$url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
|
||||
if (substr($this->type_url, 0, $url_prifix_len) !=
|
||||
GPBUtil::TYPE_URL_PREFIX) {
|
||||
throw new \Exception(
|
||||
"Type url needs to be type.googleapis.com/fully-qulified");
|
||||
}
|
||||
$fully_qualified_name =
|
||||
substr($this->type_url, $url_prifix_len);
|
||||
|
||||
// Create message according to fully qualified name.
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
$desc = $pool->getDescriptorByProtoName($fully_qualified_name);
|
||||
if (is_null($desc)) {
|
||||
throw new \Exception("Class ".$fully_qualified_name
|
||||
." hasn't been added to descriptor pool");
|
||||
}
|
||||
$klass = $desc->getClass();
|
||||
$msg = new $klass();
|
||||
|
||||
// Merge data into message.
|
||||
$msg->mergeFromString($this->value);
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type_url will be created according to the given message’s type and
|
||||
* the value is encoded data from the given message..
|
||||
* @param Message $msg A proto message.
|
||||
*/
|
||||
public function pack($msg)
|
||||
{
|
||||
if (!$msg instanceof Message) {
|
||||
trigger_error("Given parameter is not a message instance.",
|
||||
E_USER_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
// Set value using serialized message.
|
||||
$this->value = $msg->serializeToString();
|
||||
|
||||
// Set type url.
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
$desc = $pool->getDescriptorByClassName(get_class($msg));
|
||||
$fully_qualified_name = $desc->getFullName();
|
||||
$this->type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualified_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns whether the type_url in any_message is corresponded
|
||||
* to the given class.
|
||||
* @param string $klass The fully qualified PHP class name of a proto message type.
|
||||
*/
|
||||
public function is($klass)
|
||||
{
|
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
|
||||
$desc = $pool->getDescriptorByClassName($klass);
|
||||
$fully_qualified_name = $desc->getFullName();
|
||||
$type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualified_name;
|
||||
return $this->type_url === $type_url;
|
||||
}
|
||||
}
|
||||
358
vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
vendored
Normal file
358
vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
vendored
Normal file
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\Uint64;
|
||||
|
||||
class CodedInputStream
|
||||
{
|
||||
|
||||
private $buffer;
|
||||
private $buffer_size_after_limit;
|
||||
private $buffer_end;
|
||||
private $current;
|
||||
private $current_limit;
|
||||
private $legitimate_message_end;
|
||||
private $recursion_budget;
|
||||
private $recursion_limit;
|
||||
private $total_bytes_limit;
|
||||
private $total_bytes_read;
|
||||
|
||||
const MAX_VARINT_BYTES = 10;
|
||||
const DEFAULT_RECURSION_LIMIT = 100;
|
||||
const DEFAULT_TOTAL_BYTES_LIMIT = 33554432; // 32 << 20, 32MB
|
||||
|
||||
public function __construct($buffer)
|
||||
{
|
||||
$start = 0;
|
||||
$end = strlen($buffer);
|
||||
$this->buffer = $buffer;
|
||||
$this->buffer_size_after_limit = 0;
|
||||
$this->buffer_end = $end;
|
||||
$this->current = $start;
|
||||
$this->current_limit = $end;
|
||||
$this->legitimate_message_end = false;
|
||||
$this->recursion_budget = self::DEFAULT_RECURSION_LIMIT;
|
||||
$this->recursion_limit = self::DEFAULT_RECURSION_LIMIT;
|
||||
$this->total_bytes_limit = self::DEFAULT_TOTAL_BYTES_LIMIT;
|
||||
$this->total_bytes_read = $end - $start;
|
||||
}
|
||||
|
||||
private function advance($amount)
|
||||
{
|
||||
$this->current += $amount;
|
||||
}
|
||||
|
||||
public function bufferSize()
|
||||
{
|
||||
return $this->buffer_end - $this->current;
|
||||
}
|
||||
|
||||
public function current()
|
||||
{
|
||||
return $this->total_bytes_read -
|
||||
($this->buffer_end - $this->current +
|
||||
$this->buffer_size_after_limit);
|
||||
}
|
||||
|
||||
public function substr($start, $end)
|
||||
{
|
||||
return substr($this->buffer, $start, $end - $start);
|
||||
}
|
||||
|
||||
private function recomputeBufferLimits()
|
||||
{
|
||||
$this->buffer_end += $this->buffer_size_after_limit;
|
||||
$closest_limit = min($this->current_limit, $this->total_bytes_limit);
|
||||
if ($closest_limit < $this->total_bytes_read) {
|
||||
// The limit position is in the current buffer. We must adjust the
|
||||
// buffer size accordingly.
|
||||
$this->buffer_size_after_limit = $this->total_bytes_read -
|
||||
$closest_limit;
|
||||
$this->buffer_end -= $this->buffer_size_after_limit;
|
||||
} else {
|
||||
$this->buffer_size_after_limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private function consumedEntireMessage()
|
||||
{
|
||||
return $this->legitimate_message_end;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read uint32 into $var. Advance buffer with consumed bytes. If the
|
||||
* contained varint is larger than 32 bits, discard the high order bits.
|
||||
* @param $var
|
||||
*/
|
||||
public function readVarint32(&$var)
|
||||
{
|
||||
if (!$this->readVarint64($var)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
$var = bcmod($var, 4294967296);
|
||||
} else {
|
||||
$var &= 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
// Convert large uint32 to int32.
|
||||
if ($var > 0x7FFFFFFF) {
|
||||
if (PHP_INT_SIZE === 8) {
|
||||
$var = $var | (0xFFFFFFFF << 32);
|
||||
} else {
|
||||
$var = bcsub($var, 4294967296);
|
||||
}
|
||||
}
|
||||
|
||||
$var = intval($var);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read Uint64 into $var. Advance buffer with consumed bytes.
|
||||
* @param $var
|
||||
*/
|
||||
public function readVarint64(&$var)
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
$high = 0;
|
||||
$low = 0;
|
||||
$b = 0;
|
||||
|
||||
do {
|
||||
if ($this->current === $this->buffer_end) {
|
||||
return false;
|
||||
}
|
||||
if ($count === self::MAX_VARINT_BYTES) {
|
||||
return false;
|
||||
}
|
||||
$b = ord($this->buffer[$this->current]);
|
||||
$bits = 7 * $count;
|
||||
if ($bits >= 32) {
|
||||
$high |= (($b & 0x7F) << ($bits - 32));
|
||||
} else if ($bits > 25){
|
||||
// $bits is 28 in this case.
|
||||
$low |= (($b & 0x7F) << 28);
|
||||
$high = ($b & 0x7F) >> 4;
|
||||
} else {
|
||||
$low |= (($b & 0x7F) << $bits);
|
||||
}
|
||||
|
||||
$this->advance(1);
|
||||
$count += 1;
|
||||
} while ($b & 0x80);
|
||||
|
||||
$var = GPBUtil::combineInt32ToInt64($high, $low);
|
||||
if (bccomp($var, 0) < 0) {
|
||||
$var = bcadd($var, "18446744073709551616");
|
||||
}
|
||||
} else {
|
||||
$result = 0;
|
||||
$shift = 0;
|
||||
|
||||
do {
|
||||
if ($this->current === $this->buffer_end) {
|
||||
return false;
|
||||
}
|
||||
if ($count === self::MAX_VARINT_BYTES) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$byte = ord($this->buffer[$this->current]);
|
||||
$result |= ($byte & 0x7f) << $shift;
|
||||
$shift += 7;
|
||||
$this->advance(1);
|
||||
$count += 1;
|
||||
} while ($byte > 0x7f);
|
||||
|
||||
$var = $result;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read int into $var. If the result is larger than the largest integer, $var
|
||||
* will be -1. Advance buffer with consumed bytes.
|
||||
* @param $var
|
||||
*/
|
||||
public function readVarintSizeAsInt(&$var)
|
||||
{
|
||||
if (!$this->readVarint64($var)) {
|
||||
return false;
|
||||
}
|
||||
$var = (int)$var;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read 32-bit unsigned integer to $var. If the buffer has less than 4 bytes,
|
||||
* return false. Advance buffer with consumed bytes.
|
||||
* @param $var
|
||||
*/
|
||||
public function readLittleEndian32(&$var)
|
||||
{
|
||||
$data = null;
|
||||
if (!$this->readRaw(4, $data)) {
|
||||
return false;
|
||||
}
|
||||
$var = unpack('V', $data);
|
||||
$var = $var[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes,
|
||||
* return false. Advance buffer with consumed bytes.
|
||||
* @param $var
|
||||
*/
|
||||
public function readLittleEndian64(&$var)
|
||||
{
|
||||
$data = null;
|
||||
if (!$this->readRaw(4, $data)) {
|
||||
return false;
|
||||
}
|
||||
$low = unpack('V', $data)[1];
|
||||
if (!$this->readRaw(4, $data)) {
|
||||
return false;
|
||||
}
|
||||
$high = unpack('V', $data)[1];
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
$var = GPBUtil::combineInt32ToInt64($high, $low);
|
||||
} else {
|
||||
$var = ($high << 32) | $low;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read tag into $var. Advance buffer with consumed bytes.
|
||||
*/
|
||||
public function readTag()
|
||||
{
|
||||
if ($this->current === $this->buffer_end) {
|
||||
// Make sure that it failed due to EOF, not because we hit
|
||||
// total_bytes_limit, which, unlike normal limits, is not a valid
|
||||
// place to end a message.
|
||||
$current_position = $this->total_bytes_read -
|
||||
$this->buffer_size_after_limit;
|
||||
if ($current_position >= $this->total_bytes_limit) {
|
||||
// Hit total_bytes_limit_. But if we also hit the normal limit,
|
||||
// we're still OK.
|
||||
$this->legitimate_message_end =
|
||||
($this->current_limit === $this->total_bytes_limit);
|
||||
} else {
|
||||
$this->legitimate_message_end = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
$result = 0;
|
||||
// The largest tag is 2^29 - 1, which can be represented by int32.
|
||||
$success = $this->readVarint32($result);
|
||||
if ($success) {
|
||||
return $result;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function readRaw($size, &$buffer)
|
||||
{
|
||||
$current_buffer_size = 0;
|
||||
if ($this->bufferSize() < $size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($size === 0) {
|
||||
$buffer = "";
|
||||
} else {
|
||||
$buffer = substr($this->buffer, $this->current, $size);
|
||||
$this->advance($size);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Places a limit on the number of bytes that the stream may read, starting
|
||||
* from the current position. Once the stream hits this limit, it will act
|
||||
* like the end of the input has been reached until popLimit() is called.
|
||||
*
|
||||
* As the names imply, the stream conceptually has a stack of limits. The
|
||||
* shortest limit on the stack is always enforced, even if it is not the top
|
||||
* limit.
|
||||
*
|
||||
* The value returned by pushLimit() is opaque to the caller, and must be
|
||||
* passed unchanged to the corresponding call to popLimit().
|
||||
*
|
||||
* @param integer $byte_limit
|
||||
* @throws \Exception Fail to push limit.
|
||||
*/
|
||||
public function pushLimit($byte_limit)
|
||||
{
|
||||
// Current position relative to the beginning of the stream.
|
||||
$current_position = $this->current();
|
||||
$old_limit = $this->current_limit;
|
||||
|
||||
// security: byte_limit is possibly evil, so check for negative values
|
||||
// and overflow.
|
||||
if ($byte_limit >= 0 &&
|
||||
$byte_limit <= PHP_INT_MAX - $current_position &&
|
||||
$byte_limit <= $this->current_limit - $current_position) {
|
||||
$this->current_limit = $current_position + $byte_limit;
|
||||
$this->recomputeBufferLimits();
|
||||
} else {
|
||||
throw new GPBDecodeException("Fail to push limit.");
|
||||
}
|
||||
|
||||
return $old_limit;
|
||||
}
|
||||
|
||||
/* The limit passed in is actually the *old* limit, which we returned from
|
||||
* PushLimit().
|
||||
*
|
||||
* @param integer $byte_limit
|
||||
*/
|
||||
public function popLimit($byte_limit)
|
||||
{
|
||||
$this->current_limit = $byte_limit;
|
||||
$this->recomputeBufferLimits();
|
||||
// We may no longer be at a legitimate message end. ReadTag() needs to
|
||||
// be called again to find out.
|
||||
$this->legitimate_message_end = false;
|
||||
}
|
||||
|
||||
public function incrementRecursionDepthAndPushLimit(
|
||||
$byte_limit, &$old_limit, &$recursion_budget)
|
||||
{
|
||||
$old_limit = $this->pushLimit($byte_limit);
|
||||
$recursion_limit = --$this->recursion_limit;
|
||||
}
|
||||
|
||||
public function decrementRecursionDepthAndPopLimit($byte_limit)
|
||||
{
|
||||
$result = $this->consumedEntireMessage();
|
||||
$this->popLimit($byte_limit);
|
||||
++$this->recursion_budget;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function bytesUntilLimit()
|
||||
{
|
||||
if ($this->current_limit === PHP_INT_MAX) {
|
||||
return -1;
|
||||
}
|
||||
return $this->current_limit - $this->current;
|
||||
}
|
||||
}
|
||||
143
vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
vendored
Normal file
143
vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class CodedOutputStream
|
||||
{
|
||||
|
||||
private $buffer;
|
||||
private $buffer_size;
|
||||
private $current;
|
||||
private $options;
|
||||
|
||||
const MAX_VARINT64_BYTES = 10;
|
||||
|
||||
public function __construct($size, $options = 0)
|
||||
{
|
||||
$this->current = 0;
|
||||
$this->buffer_size = $size;
|
||||
$this->buffer = str_repeat(chr(0), $this->buffer_size);
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
return $this->buffer;
|
||||
}
|
||||
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function writeVarint32($value, $trim)
|
||||
{
|
||||
$bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
|
||||
$size = self::writeVarintToArray($value, $bytes, $trim);
|
||||
return $this->writeRaw($bytes, $size);
|
||||
}
|
||||
|
||||
public function writeVarint64($value)
|
||||
{
|
||||
$bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
|
||||
$size = self::writeVarintToArray($value, $bytes);
|
||||
return $this->writeRaw($bytes, $size);
|
||||
}
|
||||
|
||||
public function writeLittleEndian32($value)
|
||||
{
|
||||
$bytes = str_repeat(chr(0), 4);
|
||||
$size = self::writeLittleEndian32ToArray($value, $bytes);
|
||||
return $this->writeRaw($bytes, $size);
|
||||
}
|
||||
|
||||
public function writeLittleEndian64($value)
|
||||
{
|
||||
$bytes = str_repeat(chr(0), 8);
|
||||
$size = self::writeLittleEndian64ToArray($value, $bytes);
|
||||
return $this->writeRaw($bytes, $size);
|
||||
}
|
||||
|
||||
public function writeTag($tag)
|
||||
{
|
||||
return $this->writeVarint32($tag, true);
|
||||
}
|
||||
|
||||
public function writeRaw($data, $size)
|
||||
{
|
||||
if ($this->buffer_size < $size) {
|
||||
trigger_error("Output stream doesn't have enough buffer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
$this->buffer[$this->current] = $data[$i];
|
||||
$this->current++;
|
||||
$this->buffer_size--;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function writeVarintToArray($value, &$buffer, $trim = false)
|
||||
{
|
||||
$current = 0;
|
||||
|
||||
$high = 0;
|
||||
$low = 0;
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
GPBUtil::divideInt64ToInt32($value, $high, $low, $trim);
|
||||
} else {
|
||||
$low = $value;
|
||||
}
|
||||
|
||||
while (($low >= 0x80 || $low < 0) || $high != 0) {
|
||||
$buffer[$current] = chr($low | 0x80);
|
||||
$value = ($value >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
|
||||
$carry = ($high & 0x7F) << ((PHP_INT_SIZE << 3) - 7);
|
||||
$high = ($high >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
|
||||
$low = (($low >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7)) | $carry);
|
||||
$current++;
|
||||
}
|
||||
$buffer[$current] = chr($low);
|
||||
return $current + 1;
|
||||
}
|
||||
|
||||
private static function writeLittleEndian32ToArray($value, &$buffer)
|
||||
{
|
||||
$buffer[0] = chr($value & 0x000000FF);
|
||||
$buffer[1] = chr(($value >> 8) & 0x000000FF);
|
||||
$buffer[2] = chr(($value >> 16) & 0x000000FF);
|
||||
$buffer[3] = chr(($value >> 24) & 0x000000FF);
|
||||
return 4;
|
||||
}
|
||||
|
||||
private static function writeLittleEndian64ToArray($value, &$buffer)
|
||||
{
|
||||
$high = 0;
|
||||
$low = 0;
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
GPBUtil::divideInt64ToInt32($value, $high, $low);
|
||||
} else {
|
||||
$low = $value & 0xFFFFFFFF;
|
||||
$high = ($value >> 32) & 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
$buffer[0] = chr($low & 0x000000FF);
|
||||
$buffer[1] = chr(($low >> 8) & 0x000000FF);
|
||||
$buffer[2] = chr(($low >> 16) & 0x000000FF);
|
||||
$buffer[3] = chr(($low >> 24) & 0x000000FF);
|
||||
$buffer[4] = chr($high & 0x000000FF);
|
||||
$buffer[5] = chr(($high >> 8) & 0x000000FF);
|
||||
$buffer[6] = chr(($high >> 16) & 0x000000FF);
|
||||
$buffer[7] = chr(($high >> 24) & 0x000000FF);
|
||||
return 8;
|
||||
}
|
||||
|
||||
}
|
||||
213
vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
vendored
Normal file
213
vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class Descriptor
|
||||
{
|
||||
use HasPublicDescriptorTrait;
|
||||
|
||||
private $full_name;
|
||||
private $field = [];
|
||||
private $json_to_field = [];
|
||||
private $name_to_field = [];
|
||||
private $index_to_field = [];
|
||||
private $nested_type = [];
|
||||
private $enum_type = [];
|
||||
private $klass;
|
||||
private $legacy_klass;
|
||||
private $previous_klass;
|
||||
private $options;
|
||||
private $oneof_decl = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->public_desc = new \Google\Protobuf\Descriptor($this);
|
||||
}
|
||||
|
||||
public function addOneofDecl($oneof)
|
||||
{
|
||||
$this->oneof_decl[] = $oneof;
|
||||
}
|
||||
|
||||
public function getOneofDecl()
|
||||
{
|
||||
return $this->oneof_decl;
|
||||
}
|
||||
|
||||
public function setFullName($full_name)
|
||||
{
|
||||
$this->full_name = $full_name;
|
||||
}
|
||||
|
||||
public function getFullName()
|
||||
{
|
||||
return $this->full_name;
|
||||
}
|
||||
|
||||
public function addField($field)
|
||||
{
|
||||
$this->field[$field->getNumber()] = $field;
|
||||
$this->json_to_field[$field->getJsonName()] = $field;
|
||||
$this->name_to_field[$field->getName()] = $field;
|
||||
$this->index_to_field[] = $field;
|
||||
}
|
||||
|
||||
public function getField()
|
||||
{
|
||||
return $this->field;
|
||||
}
|
||||
|
||||
public function addNestedType($desc)
|
||||
{
|
||||
$this->nested_type[] = $desc;
|
||||
}
|
||||
|
||||
public function getNestedType()
|
||||
{
|
||||
return $this->nested_type;
|
||||
}
|
||||
|
||||
public function addEnumType($desc)
|
||||
{
|
||||
$this->enum_type[] = $desc;
|
||||
}
|
||||
|
||||
public function getEnumType()
|
||||
{
|
||||
return $this->enum_type;
|
||||
}
|
||||
|
||||
public function getFieldByNumber($number)
|
||||
{
|
||||
if (!isset($this->field[$number])) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $this->field[$number];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFieldByJsonName($json_name)
|
||||
{
|
||||
if (!isset($this->json_to_field[$json_name])) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $this->json_to_field[$json_name];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFieldByName($name)
|
||||
{
|
||||
if (!isset($this->name_to_field[$name])) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $this->name_to_field[$name];
|
||||
}
|
||||
}
|
||||
|
||||
public function getFieldByIndex($index)
|
||||
{
|
||||
if (count($this->index_to_field) <= $index) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $this->index_to_field[$index];
|
||||
}
|
||||
}
|
||||
|
||||
public function setClass($klass)
|
||||
{
|
||||
$this->klass = $klass;
|
||||
}
|
||||
|
||||
public function getClass()
|
||||
{
|
||||
return $this->klass;
|
||||
}
|
||||
|
||||
public function setLegacyClass($klass)
|
||||
{
|
||||
$this->legacy_klass = $klass;
|
||||
}
|
||||
|
||||
public function getLegacyClass()
|
||||
{
|
||||
return $this->legacy_klass;
|
||||
}
|
||||
|
||||
public function setPreviouslyUnreservedClass($klass)
|
||||
{
|
||||
$this->previous_klass = $klass;
|
||||
}
|
||||
|
||||
public function getPreviouslyUnreservedClass()
|
||||
{
|
||||
return $this->previous_klass;
|
||||
}
|
||||
|
||||
public function setOptions($options)
|
||||
{
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public static function buildFromProto($proto, $file_proto, $containing)
|
||||
{
|
||||
$desc = new Descriptor();
|
||||
|
||||
$message_name_without_package = "";
|
||||
$classname = "";
|
||||
$legacy_classname = "";
|
||||
$previous_classname = "";
|
||||
$fullname = "";
|
||||
GPBUtil::getFullClassName(
|
||||
$proto,
|
||||
$containing,
|
||||
$file_proto,
|
||||
$message_name_without_package,
|
||||
$classname,
|
||||
$legacy_classname,
|
||||
$fullname,
|
||||
$previous_classname);
|
||||
$desc->setFullName($fullname);
|
||||
$desc->setClass($classname);
|
||||
$desc->setLegacyClass($legacy_classname);
|
||||
$desc->setPreviouslyUnreservedClass($previous_classname);
|
||||
$desc->setOptions($proto->getOptions());
|
||||
|
||||
foreach ($proto->getField() as $field_proto) {
|
||||
$desc->addField(FieldDescriptor::buildFromProto($field_proto));
|
||||
}
|
||||
|
||||
// Handle nested types.
|
||||
foreach ($proto->getNestedType() as $nested_proto) {
|
||||
$desc->addNestedType(Descriptor::buildFromProto(
|
||||
$nested_proto, $file_proto, $message_name_without_package));
|
||||
}
|
||||
|
||||
// Handle nested enum.
|
||||
foreach ($proto->getEnumType() as $enum_proto) {
|
||||
$desc->addEnumType(EnumDescriptor::buildFromProto(
|
||||
$enum_proto, $file_proto, $message_name_without_package));
|
||||
}
|
||||
|
||||
// Handle oneof fields.
|
||||
$index = 0;
|
||||
foreach ($proto->getOneofDecl() as $oneof_proto) {
|
||||
$desc->addOneofDecl(
|
||||
OneofDescriptor::buildFromProto($oneof_proto, $desc, $index));
|
||||
$index++;
|
||||
}
|
||||
|
||||
return $desc;
|
||||
}
|
||||
}
|
||||
174
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
vendored
Normal file
174
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\Descriptor;
|
||||
use Google\Protobuf\Internal\FileDescriptor;
|
||||
use Google\Protobuf\Internal\FileDescriptorSet;
|
||||
use Google\Protobuf\Internal\MessageBuilderContext;
|
||||
use Google\Protobuf\Internal\EnumBuilderContext;
|
||||
|
||||
class DescriptorPool
|
||||
{
|
||||
private static $pool;
|
||||
// Map from message names to sub-maps, which are maps from field numbers to
|
||||
// field descriptors.
|
||||
private $unique_descs = [];
|
||||
private $class_to_desc = [];
|
||||
private $class_to_enum_desc = [];
|
||||
private $proto_to_class = [];
|
||||
|
||||
public static function getGeneratedPool()
|
||||
{
|
||||
if (!isset(self::$pool)) {
|
||||
self::$pool = new DescriptorPool();
|
||||
}
|
||||
return self::$pool;
|
||||
}
|
||||
|
||||
public function internalAddGeneratedFile($data, $use_nested = false)
|
||||
{
|
||||
$files = new FileDescriptorSet();
|
||||
$files->mergeFromString($data);
|
||||
|
||||
foreach($files->getFile() as $file_proto) {
|
||||
$file = FileDescriptor::buildFromProto($file_proto);
|
||||
|
||||
foreach ($file->getMessageType() as $desc) {
|
||||
$this->addDescriptor($desc);
|
||||
}
|
||||
unset($desc);
|
||||
|
||||
foreach ($file->getEnumType() as $desc) {
|
||||
$this->addEnumDescriptor($desc);
|
||||
}
|
||||
unset($desc);
|
||||
|
||||
foreach ($file->getMessageType() as $desc) {
|
||||
$this->crossLink($desc);
|
||||
}
|
||||
unset($desc);
|
||||
}
|
||||
}
|
||||
|
||||
public function addMessage($name, $klass)
|
||||
{
|
||||
return new MessageBuilderContext($name, $klass, $this);
|
||||
}
|
||||
|
||||
public function addEnum($name, $klass)
|
||||
{
|
||||
return new EnumBuilderContext($name, $klass, $this);
|
||||
}
|
||||
|
||||
public function addDescriptor($descriptor)
|
||||
{
|
||||
$this->proto_to_class[$descriptor->getFullName()] =
|
||||
$descriptor->getClass();
|
||||
$this->unique_descs[$descriptor->getFullName()] =
|
||||
$descriptor;
|
||||
$this->class_to_desc[$descriptor->getClass()] = $descriptor;
|
||||
$this->class_to_desc[$descriptor->getLegacyClass()] = $descriptor;
|
||||
$this->class_to_desc[$descriptor->getPreviouslyUnreservedClass()] = $descriptor;
|
||||
foreach ($descriptor->getNestedType() as $nested_type) {
|
||||
$this->addDescriptor($nested_type);
|
||||
}
|
||||
foreach ($descriptor->getEnumType() as $enum_type) {
|
||||
$this->addEnumDescriptor($enum_type);
|
||||
}
|
||||
}
|
||||
|
||||
public function addEnumDescriptor($descriptor)
|
||||
{
|
||||
$this->proto_to_class[$descriptor->getFullName()] =
|
||||
$descriptor->getClass();
|
||||
$this->class_to_enum_desc[$descriptor->getClass()] = $descriptor;
|
||||
$this->class_to_enum_desc[$descriptor->getLegacyClass()] = $descriptor;
|
||||
}
|
||||
|
||||
public function getDescriptorByClassName($klass)
|
||||
{
|
||||
if (isset($this->class_to_desc[$klass])) {
|
||||
return $this->class_to_desc[$klass];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getEnumDescriptorByClassName($klass)
|
||||
{
|
||||
if (isset($this->class_to_enum_desc[$klass])) {
|
||||
return $this->class_to_enum_desc[$klass];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDescriptorByProtoName($proto)
|
||||
{
|
||||
if (isset($this->proto_to_class[$proto])) {
|
||||
$klass = $this->proto_to_class[$proto];
|
||||
return $this->class_to_desc[$klass];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getEnumDescriptorByProtoName($proto)
|
||||
{
|
||||
$klass = $this->proto_to_class[$proto];
|
||||
return $this->class_to_enum_desc[$klass];
|
||||
}
|
||||
|
||||
private function crossLink(Descriptor $desc)
|
||||
{
|
||||
foreach ($desc->getField() as $field) {
|
||||
switch ($field->getType()) {
|
||||
case GPBType::MESSAGE:
|
||||
$proto = $field->getMessageType();
|
||||
if ($proto[0] == '.') {
|
||||
$proto = substr($proto, 1);
|
||||
}
|
||||
$subdesc = $this->getDescriptorByProtoName($proto);
|
||||
if (is_null($subdesc)) {
|
||||
trigger_error(
|
||||
'proto not added: ' . $proto
|
||||
. " for " . $desc->getFullName(), E_USER_ERROR);
|
||||
}
|
||||
$field->setMessageType($subdesc);
|
||||
break;
|
||||
case GPBType::ENUM:
|
||||
$proto = $field->getEnumType();
|
||||
if ($proto[0] == '.') {
|
||||
$proto = substr($proto, 1);
|
||||
}
|
||||
$field->setEnumType(
|
||||
$this->getEnumDescriptorByProtoName($proto));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($field);
|
||||
|
||||
foreach ($desc->getNestedType() as $nested_type) {
|
||||
$this->crossLink($nested_type);
|
||||
}
|
||||
unset($nested_type);
|
||||
}
|
||||
|
||||
public function finish()
|
||||
{
|
||||
foreach ($this->unique_descs as $klass => $desc) {
|
||||
$this->crossLink($desc);
|
||||
}
|
||||
unset($desc);
|
||||
}
|
||||
}
|
||||
381
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
vendored
Normal file
381
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
vendored
Normal file
@@ -0,0 +1,381 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes a message type.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
|
||||
*/
|
||||
class DescriptorProto extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
*/
|
||||
protected $name = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
|
||||
*/
|
||||
private $field;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
|
||||
*/
|
||||
private $extension;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
|
||||
*/
|
||||
private $nested_type;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
|
||||
*/
|
||||
private $enum_type;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
|
||||
*/
|
||||
private $extension_range;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
|
||||
*/
|
||||
private $oneof_decl;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
|
||||
*/
|
||||
private $reserved_range;
|
||||
/**
|
||||
* Reserved field names, which may not be used by fields in the same message.
|
||||
* A given name may only be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
|
||||
*/
|
||||
private $reserved_name;
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 11;</code>
|
||||
*/
|
||||
protected $visibility = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* @type \Google\Protobuf\Internal\FieldDescriptorProto[] $field
|
||||
* @type \Google\Protobuf\Internal\FieldDescriptorProto[] $extension
|
||||
* @type \Google\Protobuf\Internal\DescriptorProto[] $nested_type
|
||||
* @type \Google\Protobuf\Internal\EnumDescriptorProto[] $enum_type
|
||||
* @type \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[] $extension_range
|
||||
* @type \Google\Protobuf\Internal\OneofDescriptorProto[] $oneof_decl
|
||||
* @type \Google\Protobuf\Internal\MessageOptions $options
|
||||
* @type \Google\Protobuf\Internal\DescriptorProto\ReservedRange[] $reserved_range
|
||||
* @type string[] $reserved_name
|
||||
* Reserved field names, which may not be used by fields in the same message.
|
||||
* A given name may only be reserved once.
|
||||
* @type int $visibility
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->name) ? $this->name : '';
|
||||
}
|
||||
|
||||
public function hasName()
|
||||
{
|
||||
return isset($this->name);
|
||||
}
|
||||
|
||||
public function clearName()
|
||||
{
|
||||
unset($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto>
|
||||
*/
|
||||
public function getField()
|
||||
{
|
||||
return $this->field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setField($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
|
||||
$this->field = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto>
|
||||
*/
|
||||
public function getExtension()
|
||||
{
|
||||
return $this->extension;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtension($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
|
||||
$this->extension = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto>
|
||||
*/
|
||||
public function getNestedType()
|
||||
{
|
||||
return $this->nested_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
|
||||
* @param \Google\Protobuf\Internal\DescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNestedType($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
|
||||
$this->nested_type = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto>
|
||||
*/
|
||||
public function getEnumType()
|
||||
{
|
||||
return $this->enum_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnumType($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
|
||||
$this->enum_type = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>
|
||||
*/
|
||||
public function getExtensionRange()
|
||||
{
|
||||
return $this->extension_range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
|
||||
* @param \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtensionRange($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
|
||||
$this->extension_range = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\OneofDescriptorProto>
|
||||
*/
|
||||
public function getOneofDecl()
|
||||
{
|
||||
return $this->oneof_decl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
|
||||
* @param \Google\Protobuf\Internal\OneofDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOneofDecl($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
|
||||
$this->oneof_decl = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
|
||||
* @return \Google\Protobuf\Internal\MessageOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
|
||||
* @param \Google\Protobuf\Internal\MessageOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>
|
||||
*/
|
||||
public function getReservedRange()
|
||||
{
|
||||
return $this->reserved_range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
|
||||
* @param \Google\Protobuf\Internal\DescriptorProto\ReservedRange[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReservedRange($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
|
||||
$this->reserved_range = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reserved field names, which may not be used by fields in the same message.
|
||||
* A given name may only be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
|
||||
* @return RepeatedField<string>
|
||||
*/
|
||||
public function getReservedName()
|
||||
{
|
||||
return $this->reserved_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reserved field names, which may not be used by fields in the same message.
|
||||
* A given name may only be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
|
||||
* @param string[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReservedName($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
|
||||
$this->reserved_name = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 11;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getVisibility()
|
||||
{
|
||||
return isset($this->visibility) ? $this->visibility : 0;
|
||||
}
|
||||
|
||||
public function hasVisibility()
|
||||
{
|
||||
return isset($this->visibility);
|
||||
}
|
||||
|
||||
public function clearVisibility()
|
||||
{
|
||||
unset($this->visibility);
|
||||
}
|
||||
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 11;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setVisibility($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\SymbolVisibility::class);
|
||||
$this->visibility = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
159
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
vendored
Normal file
159
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\DescriptorProto;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
|
||||
*/
|
||||
class ExtensionRange extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
*/
|
||||
protected $start = null;
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
*/
|
||||
protected $end = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $start
|
||||
* Inclusive.
|
||||
* @type int $end
|
||||
* Exclusive.
|
||||
* @type \Google\Protobuf\Internal\ExtensionRangeOptions $options
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return isset($this->start) ? $this->start : 0;
|
||||
}
|
||||
|
||||
public function hasStart()
|
||||
{
|
||||
return isset($this->start);
|
||||
}
|
||||
|
||||
public function clearStart()
|
||||
{
|
||||
unset($this->start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setStart($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->start = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return isset($this->end) ? $this->end : 0;
|
||||
}
|
||||
|
||||
public function hasEnd()
|
||||
{
|
||||
return isset($this->end);
|
||||
}
|
||||
|
||||
public function clearEnd()
|
||||
{
|
||||
unset($this->end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnd($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->end = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
|
||||
* @return \Google\Protobuf\Internal\ExtensionRangeOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
|
||||
* @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
126
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
vendored
Normal file
126
vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\DescriptorProto;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Range of reserved tag numbers. Reserved tag numbers may not be used by
|
||||
* fields or extension ranges in the same message. Reserved ranges may
|
||||
* not overlap.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
|
||||
*/
|
||||
class ReservedRange extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
*/
|
||||
protected $start = null;
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
*/
|
||||
protected $end = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $start
|
||||
* Inclusive.
|
||||
* @type int $end
|
||||
* Exclusive.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return isset($this->start) ? $this->start : 0;
|
||||
}
|
||||
|
||||
public function hasStart()
|
||||
{
|
||||
return isset($this->start);
|
||||
}
|
||||
|
||||
public function clearStart()
|
||||
{
|
||||
unset($this->start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setStart($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->start = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return isset($this->end) ? $this->end : 0;
|
||||
}
|
||||
|
||||
public function hasEnd()
|
||||
{
|
||||
return isset($this->end);
|
||||
}
|
||||
|
||||
public function clearEnd()
|
||||
{
|
||||
unset($this->end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnd($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->end = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
129
vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php
vendored
Normal file
129
vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* The full set of known editions.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.Edition</code>
|
||||
*/
|
||||
class Edition
|
||||
{
|
||||
/**
|
||||
* A placeholder for an unknown edition value.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const EDITION_UNKNOWN = 0;
|
||||
/**
|
||||
* A placeholder edition for specifying default behaviors *before* a feature
|
||||
* was first introduced. This is effectively an "infinite past".
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_LEGACY = 900;</code>
|
||||
*/
|
||||
const EDITION_LEGACY = 900;
|
||||
/**
|
||||
* Legacy syntax "editions". These pre-date editions, but behave much like
|
||||
* distinct editions. These can't be used to specify the edition of proto
|
||||
* files, but feature definitions must supply proto2/proto3 defaults for
|
||||
* backwards compatibility.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_PROTO2 = 998;</code>
|
||||
*/
|
||||
const EDITION_PROTO2 = 998;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_PROTO3 = 999;</code>
|
||||
*/
|
||||
const EDITION_PROTO3 = 999;
|
||||
/**
|
||||
* Editions that have been released. The specific values are arbitrary and
|
||||
* should not be depended on, but they will always be time-ordered for easy
|
||||
* comparison.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_2023 = 1000;</code>
|
||||
*/
|
||||
const EDITION_2023 = 1000;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_2024 = 1001;</code>
|
||||
*/
|
||||
const EDITION_2024 = 1001;
|
||||
/**
|
||||
* A placeholder edition for developing and testing unscheduled features.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_UNSTABLE = 9999;</code>
|
||||
*/
|
||||
const EDITION_UNSTABLE = 9999;
|
||||
/**
|
||||
* Placeholder editions for testing feature resolution. These should not be
|
||||
* used or relied on outside of tests.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_1_TEST_ONLY = 1;</code>
|
||||
*/
|
||||
const EDITION_1_TEST_ONLY = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_2_TEST_ONLY = 2;</code>
|
||||
*/
|
||||
const EDITION_2_TEST_ONLY = 2;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_99997_TEST_ONLY = 99997;</code>
|
||||
*/
|
||||
const EDITION_99997_TEST_ONLY = 99997;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_99998_TEST_ONLY = 99998;</code>
|
||||
*/
|
||||
const EDITION_99998_TEST_ONLY = 99998;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EDITION_99999_TEST_ONLY = 99999;</code>
|
||||
*/
|
||||
const EDITION_99999_TEST_ONLY = 99999;
|
||||
/**
|
||||
* Placeholder for specifying unbounded edition support. This should only
|
||||
* ever be used by plugins that can expect to never require any changes to
|
||||
* support a new edition.
|
||||
*
|
||||
* Generated from protobuf enum <code>EDITION_MAX = 2147483647;</code>
|
||||
*/
|
||||
const EDITION_MAX = 2147483647;
|
||||
|
||||
private static $valueToName = [
|
||||
self::EDITION_UNKNOWN => 'EDITION_UNKNOWN',
|
||||
self::EDITION_LEGACY => 'EDITION_LEGACY',
|
||||
self::EDITION_PROTO2 => 'EDITION_PROTO2',
|
||||
self::EDITION_PROTO3 => 'EDITION_PROTO3',
|
||||
self::EDITION_2023 => 'EDITION_2023',
|
||||
self::EDITION_2024 => 'EDITION_2024',
|
||||
self::EDITION_UNSTABLE => 'EDITION_UNSTABLE',
|
||||
self::EDITION_1_TEST_ONLY => 'EDITION_1_TEST_ONLY',
|
||||
self::EDITION_2_TEST_ONLY => 'EDITION_2_TEST_ONLY',
|
||||
self::EDITION_99997_TEST_ONLY => 'EDITION_99997_TEST_ONLY',
|
||||
self::EDITION_99998_TEST_ONLY => 'EDITION_99998_TEST_ONLY',
|
||||
self::EDITION_99999_TEST_ONLY => 'EDITION_99999_TEST_ONLY',
|
||||
self::EDITION_MAX => 'EDITION_MAX',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
40
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
vendored
Normal file
40
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\EnumDescriptor;
|
||||
use Google\Protobuf\EnumValueDescriptor;
|
||||
|
||||
class EnumBuilderContext
|
||||
{
|
||||
|
||||
private $descriptor;
|
||||
private $pool;
|
||||
|
||||
public function __construct($full_name, $klass, $pool)
|
||||
{
|
||||
$this->descriptor = new EnumDescriptor();
|
||||
$this->descriptor->setFullName($full_name);
|
||||
$this->descriptor->setClass($klass);
|
||||
$this->pool = $pool;
|
||||
}
|
||||
|
||||
public function value($name, $number)
|
||||
{
|
||||
$value = new EnumValueDescriptor($name, $number);
|
||||
$this->descriptor->addValue($number, $value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function finalizeToPool()
|
||||
{
|
||||
$this->pool->addEnumDescriptor($this->descriptor);
|
||||
}
|
||||
}
|
||||
116
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
vendored
Normal file
116
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\EnumValueDescriptor;
|
||||
|
||||
class EnumDescriptor
|
||||
{
|
||||
use HasPublicDescriptorTrait;
|
||||
|
||||
private $klass;
|
||||
private $legacy_klass;
|
||||
private $full_name;
|
||||
private $value;
|
||||
private $name_to_value;
|
||||
private $value_descriptor = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->public_desc = new \Google\Protobuf\EnumDescriptor($this);
|
||||
}
|
||||
|
||||
public function setFullName($full_name)
|
||||
{
|
||||
$this->full_name = $full_name;
|
||||
}
|
||||
|
||||
public function getFullName()
|
||||
{
|
||||
return $this->full_name;
|
||||
}
|
||||
|
||||
public function addValue($number, $value)
|
||||
{
|
||||
$this->value[$number] = $value;
|
||||
$this->name_to_value[$value->getName()] = $value;
|
||||
$this->value_descriptor[] = new EnumValueDescriptor($value->getName(), $number);
|
||||
}
|
||||
|
||||
public function getValueByNumber($number)
|
||||
{
|
||||
if (isset($this->value[$number])) {
|
||||
return $this->value[$number];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getValueByName($name)
|
||||
{
|
||||
if (isset($this->name_to_value[$name])) {
|
||||
return $this->name_to_value[$name];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getValueDescriptorByIndex($index)
|
||||
{
|
||||
if (isset($this->value_descriptor[$index])) {
|
||||
return $this->value_descriptor[$index];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getValueCount()
|
||||
{
|
||||
return count($this->value);
|
||||
}
|
||||
|
||||
public function setClass($klass)
|
||||
{
|
||||
$this->klass = $klass;
|
||||
}
|
||||
|
||||
public function getClass()
|
||||
{
|
||||
return $this->klass;
|
||||
}
|
||||
|
||||
public function setLegacyClass($klass)
|
||||
{
|
||||
$this->legacy_klass = $klass;
|
||||
}
|
||||
|
||||
public function getLegacyClass()
|
||||
{
|
||||
return $this->legacy_klass;
|
||||
}
|
||||
|
||||
public static function buildFromProto($proto, $file_proto, $containing)
|
||||
{
|
||||
$desc = new EnumDescriptor();
|
||||
|
||||
$enum_name_without_package = "";
|
||||
$classname = "";
|
||||
$legacy_classname = "";
|
||||
$fullname = "";
|
||||
GPBUtil::getFullClassName(
|
||||
$proto,
|
||||
$containing,
|
||||
$file_proto,
|
||||
$enum_name_without_package,
|
||||
$classname,
|
||||
$legacy_classname,
|
||||
$fullname,
|
||||
$unused_previous_classname);
|
||||
$desc->setFullName($fullname);
|
||||
$desc->setClass($classname);
|
||||
$desc->setLegacyClass($legacy_classname);
|
||||
$values = $proto->getValue();
|
||||
foreach ($values as $value) {
|
||||
$desc->addValue($value->getNumber(), $value);
|
||||
}
|
||||
|
||||
return $desc;
|
||||
}
|
||||
}
|
||||
261
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
vendored
Normal file
261
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
vendored
Normal file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes an enum type.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
|
||||
*/
|
||||
class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
*/
|
||||
protected $name = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
|
||||
*/
|
||||
private $value;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
/**
|
||||
* Range of reserved numeric values. Reserved numeric values may not be used
|
||||
* by enum values in the same enum declaration. Reserved ranges may not
|
||||
* overlap.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
|
||||
*/
|
||||
private $reserved_range;
|
||||
/**
|
||||
* Reserved enum value names, which may not be reused. A given name may only
|
||||
* be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
|
||||
*/
|
||||
private $reserved_name;
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 6;</code>
|
||||
*/
|
||||
protected $visibility = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* @type \Google\Protobuf\Internal\EnumValueDescriptorProto[] $value
|
||||
* @type \Google\Protobuf\Internal\EnumOptions $options
|
||||
* @type \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[] $reserved_range
|
||||
* Range of reserved numeric values. Reserved numeric values may not be used
|
||||
* by enum values in the same enum declaration. Reserved ranges may not
|
||||
* overlap.
|
||||
* @type string[] $reserved_name
|
||||
* Reserved enum value names, which may not be reused. A given name may only
|
||||
* be reserved once.
|
||||
* @type int $visibility
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->name) ? $this->name : '';
|
||||
}
|
||||
|
||||
public function hasName()
|
||||
{
|
||||
return isset($this->name);
|
||||
}
|
||||
|
||||
public function clearName()
|
||||
{
|
||||
unset($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\EnumValueDescriptorProto>
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumValueDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
|
||||
$this->value = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
|
||||
* @return \Google\Protobuf\Internal\EnumOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Range of reserved numeric values. Reserved numeric values may not be used
|
||||
* by enum values in the same enum declaration. Reserved ranges may not
|
||||
* overlap.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>
|
||||
*/
|
||||
public function getReservedRange()
|
||||
{
|
||||
return $this->reserved_range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Range of reserved numeric values. Reserved numeric values may not be used
|
||||
* by enum values in the same enum declaration. Reserved ranges may not
|
||||
* overlap.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReservedRange($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class);
|
||||
$this->reserved_range = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reserved enum value names, which may not be reused. A given name may only
|
||||
* be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
|
||||
* @return RepeatedField<string>
|
||||
*/
|
||||
public function getReservedName()
|
||||
{
|
||||
return $this->reserved_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reserved enum value names, which may not be reused. A given name may only
|
||||
* be reserved once.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
|
||||
* @param string[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReservedName($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
|
||||
$this->reserved_name = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 6;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getVisibility()
|
||||
{
|
||||
return isset($this->visibility) ? $this->visibility : 0;
|
||||
}
|
||||
|
||||
public function hasVisibility()
|
||||
{
|
||||
return isset($this->visibility);
|
||||
}
|
||||
|
||||
public function clearVisibility()
|
||||
{
|
||||
unset($this->visibility);
|
||||
}
|
||||
|
||||
/**
|
||||
* Support for `export` and `local` keywords on enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SymbolVisibility visibility = 6;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setVisibility($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\SymbolVisibility::class);
|
||||
$this->visibility = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
128
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
vendored
Normal file
128
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\EnumDescriptorProto;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Range of reserved numeric values. Reserved values may not be used by
|
||||
* entries in the same enum. Reserved ranges may not overlap.
|
||||
* Note that this is distinct from DescriptorProto.ReservedRange in that it
|
||||
* is inclusive such that it can appropriately represent the entire int32
|
||||
* domain.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
|
||||
*/
|
||||
class EnumReservedRange extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
*/
|
||||
protected $start = null;
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
*/
|
||||
protected $end = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $start
|
||||
* Inclusive.
|
||||
* @type int $end
|
||||
* Inclusive.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return isset($this->start) ? $this->start : 0;
|
||||
}
|
||||
|
||||
public function hasStart()
|
||||
{
|
||||
return isset($this->start);
|
||||
}
|
||||
|
||||
public function clearStart()
|
||||
{
|
||||
unset($this->start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 start = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setStart($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->start = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return isset($this->end) ? $this->end : 0;
|
||||
}
|
||||
|
||||
public function hasEnd()
|
||||
{
|
||||
return isset($this->end);
|
||||
}
|
||||
|
||||
public function clearEnd()
|
||||
{
|
||||
unset($this->end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inclusive.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnd($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->end = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
303
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
vendored
Normal file
303
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
vendored
Normal file
@@ -0,0 +1,303 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.EnumOptions</code>
|
||||
*/
|
||||
class EnumOptions extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Set this option to true to allow mapping different tag names to the same
|
||||
* value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
|
||||
*/
|
||||
protected $allow_alias = null;
|
||||
/**
|
||||
* Is this enum deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
*/
|
||||
protected $deprecated = null;
|
||||
/**
|
||||
* Enable the legacy handling of JSON field name conflicts. This lowercases
|
||||
* and strips underscored from the fields before comparison in proto3 only.
|
||||
* The new behavior takes `json_name` into account and applies to proto2 as
|
||||
* well.
|
||||
* TODO Remove this legacy behavior once downstream teams have
|
||||
* had time to migrate.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
|
||||
* @deprecated
|
||||
*/
|
||||
protected $deprecated_legacy_json_field_conflicts = null;
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code>
|
||||
*/
|
||||
protected $features = null;
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
*/
|
||||
private $uninterpreted_option;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type bool $allow_alias
|
||||
* Set this option to true to allow mapping different tag names to the same
|
||||
* value.
|
||||
* @type bool $deprecated
|
||||
* Is this enum deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating enums.
|
||||
* @type bool $deprecated_legacy_json_field_conflicts
|
||||
* Enable the legacy handling of JSON field name conflicts. This lowercases
|
||||
* and strips underscored from the fields before comparison in proto3 only.
|
||||
* The new behavior takes `json_name` into account and applies to proto2 as
|
||||
* well.
|
||||
* TODO Remove this legacy behavior once downstream teams have
|
||||
* had time to migrate.
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $features
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
* @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this option to true to allow mapping different tag names to the same
|
||||
* value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getAllowAlias()
|
||||
{
|
||||
return isset($this->allow_alias) ? $this->allow_alias : false;
|
||||
}
|
||||
|
||||
public function hasAllowAlias()
|
||||
{
|
||||
return isset($this->allow_alias);
|
||||
}
|
||||
|
||||
public function clearAllowAlias()
|
||||
{
|
||||
unset($this->allow_alias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this option to true to allow mapping different tag names to the same
|
||||
* value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool allow_alias = 2;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setAllowAlias($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->allow_alias = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this enum deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getDeprecated()
|
||||
{
|
||||
return isset($this->deprecated) ? $this->deprecated : false;
|
||||
}
|
||||
|
||||
public function hasDeprecated()
|
||||
{
|
||||
return isset($this->deprecated);
|
||||
}
|
||||
|
||||
public function clearDeprecated()
|
||||
{
|
||||
unset($this->deprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this enum deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeprecated($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->deprecated = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the legacy handling of JSON field name conflicts. This lowercases
|
||||
* and strips underscored from the fields before comparison in proto3 only.
|
||||
* The new behavior takes `json_name` into account and applies to proto2 as
|
||||
* well.
|
||||
* TODO Remove this legacy behavior once downstream teams have
|
||||
* had time to migrate.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
|
||||
* @return bool
|
||||
* @deprecated
|
||||
*/
|
||||
public function getDeprecatedLegacyJsonFieldConflicts()
|
||||
{
|
||||
if (isset($this->deprecated_legacy_json_field_conflicts)) {
|
||||
@trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
|
||||
}
|
||||
return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false;
|
||||
}
|
||||
|
||||
public function hasDeprecatedLegacyJsonFieldConflicts()
|
||||
{
|
||||
if (isset($this->deprecated_legacy_json_field_conflicts)) {
|
||||
@trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
|
||||
}
|
||||
return isset($this->deprecated_legacy_json_field_conflicts);
|
||||
}
|
||||
|
||||
public function clearDeprecatedLegacyJsonFieldConflicts()
|
||||
{
|
||||
@trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
|
||||
unset($this->deprecated_legacy_json_field_conflicts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the legacy handling of JSON field name conflicts. This lowercases
|
||||
* and strips underscored from the fields before comparison in proto3 only.
|
||||
* The new behavior takes `json_name` into account and applies to proto2 as
|
||||
* well.
|
||||
* TODO Remove this legacy behavior once downstream teams have
|
||||
* had time to migrate.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
* @deprecated
|
||||
*/
|
||||
public function setDeprecatedLegacyJsonFieldConflicts($var)
|
||||
{
|
||||
@trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
|
||||
GPBUtil::checkBool($var);
|
||||
$this->deprecated_legacy_json_field_conflicts = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getFeatures()
|
||||
{
|
||||
return $this->features;
|
||||
}
|
||||
|
||||
public function hasFeatures()
|
||||
{
|
||||
return isset($this->features);
|
||||
}
|
||||
|
||||
public function clearFeatures()
|
||||
{
|
||||
unset($this->features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption>
|
||||
*/
|
||||
public function getUninterpretedOption()
|
||||
{
|
||||
return $this->uninterpreted_option;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @param \Google\Protobuf\Internal\UninterpretedOption[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUninterpretedOption($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
|
||||
$this->uninterpreted_option = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
147
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
vendored
Normal file
147
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes a value within an enum.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
|
||||
*/
|
||||
class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
*/
|
||||
protected $name = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 2;</code>
|
||||
*/
|
||||
protected $number = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* @type int $number
|
||||
* @type \Google\Protobuf\Internal\EnumValueOptions $options
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->name) ? $this->name : '';
|
||||
}
|
||||
|
||||
public function hasName()
|
||||
{
|
||||
return isset($this->name);
|
||||
}
|
||||
|
||||
public function clearName()
|
||||
{
|
||||
unset($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return isset($this->number) ? $this->number : 0;
|
||||
}
|
||||
|
||||
public function hasNumber()
|
||||
{
|
||||
return isset($this->number);
|
||||
}
|
||||
|
||||
public function clearNumber()
|
||||
{
|
||||
unset($this->number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->number = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
|
||||
* @return \Google\Protobuf\Internal\EnumValueOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumValueOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
276
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
vendored
Normal file
276
vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
vendored
Normal file
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
|
||||
*/
|
||||
class EnumValueOptions extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Is this enum value deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum value, or it will be completely ignored; in the very least,
|
||||
* this is a formalization for deprecating enum values.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
|
||||
*/
|
||||
protected $deprecated = null;
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code>
|
||||
*/
|
||||
protected $features = null;
|
||||
/**
|
||||
* Indicate that fields annotated with this enum value should not be printed
|
||||
* out when using debug formats, e.g. when the field contains sensitive
|
||||
* credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code>
|
||||
*/
|
||||
protected $debug_redact = null;
|
||||
/**
|
||||
* Information about the support window of a feature value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code>
|
||||
*/
|
||||
protected $feature_support = null;
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
*/
|
||||
private $uninterpreted_option;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type bool $deprecated
|
||||
* Is this enum value deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum value, or it will be completely ignored; in the very least,
|
||||
* this is a formalization for deprecating enum values.
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $features
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
* @type bool $debug_redact
|
||||
* Indicate that fields annotated with this enum value should not be printed
|
||||
* out when using debug formats, e.g. when the field contains sensitive
|
||||
* credentials.
|
||||
* @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support
|
||||
* Information about the support window of a feature value.
|
||||
* @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this enum value deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum value, or it will be completely ignored; in the very least,
|
||||
* this is a formalization for deprecating enum values.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getDeprecated()
|
||||
{
|
||||
return isset($this->deprecated) ? $this->deprecated : false;
|
||||
}
|
||||
|
||||
public function hasDeprecated()
|
||||
{
|
||||
return isset($this->deprecated);
|
||||
}
|
||||
|
||||
public function clearDeprecated()
|
||||
{
|
||||
unset($this->deprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this enum value deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for the enum value, or it will be completely ignored; in the very least,
|
||||
* this is a formalization for deprecating enum values.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeprecated($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->deprecated = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getFeatures()
|
||||
{
|
||||
return $this->features;
|
||||
}
|
||||
|
||||
public function hasFeatures()
|
||||
{
|
||||
return isset($this->features);
|
||||
}
|
||||
|
||||
public function clearFeatures()
|
||||
{
|
||||
unset($this->features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that fields annotated with this enum value should not be printed
|
||||
* out when using debug formats, e.g. when the field contains sensitive
|
||||
* credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getDebugRedact()
|
||||
{
|
||||
return isset($this->debug_redact) ? $this->debug_redact : false;
|
||||
}
|
||||
|
||||
public function hasDebugRedact()
|
||||
{
|
||||
return isset($this->debug_redact);
|
||||
}
|
||||
|
||||
public function clearDebugRedact()
|
||||
{
|
||||
unset($this->debug_redact);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that fields annotated with this enum value should not be printed
|
||||
* out when using debug formats, e.g. when the field contains sensitive
|
||||
* credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebugRedact($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->debug_redact = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about the support window of a feature value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code>
|
||||
* @return \Google\Protobuf\Internal\FieldOptions\FeatureSupport|null
|
||||
*/
|
||||
public function getFeatureSupport()
|
||||
{
|
||||
return $this->feature_support;
|
||||
}
|
||||
|
||||
public function hasFeatureSupport()
|
||||
{
|
||||
return isset($this->feature_support);
|
||||
}
|
||||
|
||||
public function clearFeatureSupport()
|
||||
{
|
||||
unset($this->feature_support);
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about the support window of a feature value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldOptions\FeatureSupport $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatureSupport($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class);
|
||||
$this->feature_support = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption>
|
||||
*/
|
||||
public function getUninterpretedOption()
|
||||
{
|
||||
return $this->uninterpreted_option;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @param \Google\Protobuf\Internal\UninterpretedOption[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUninterpretedOption($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
|
||||
$this->uninterpreted_option = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
206
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
vendored
Normal file
206
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
|
||||
*/
|
||||
class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
*/
|
||||
private $uninterpreted_option;
|
||||
/**
|
||||
* For external users: DO NOT USE. We are in the process of open sourcing
|
||||
* extension declaration and executing internal cleanups before it can be
|
||||
* used externally.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code>
|
||||
*/
|
||||
private $declaration;
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code>
|
||||
*/
|
||||
protected $features = null;
|
||||
/**
|
||||
* The verification state of the range.
|
||||
* TODO: flip the default to DECLARATION once all empty ranges
|
||||
* are marked as UNVERIFIED.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code>
|
||||
*/
|
||||
protected $verification = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
* @type \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration[] $declaration
|
||||
* For external users: DO NOT USE. We are in the process of open sourcing
|
||||
* extension declaration and executing internal cleanups before it can be
|
||||
* used externally.
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $features
|
||||
* Any features defined in the specific edition.
|
||||
* @type int $verification
|
||||
* The verification state of the range.
|
||||
* TODO: flip the default to DECLARATION once all empty ranges
|
||||
* are marked as UNVERIFIED.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption>
|
||||
*/
|
||||
public function getUninterpretedOption()
|
||||
{
|
||||
return $this->uninterpreted_option;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @param \Google\Protobuf\Internal\UninterpretedOption[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUninterpretedOption($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
|
||||
$this->uninterpreted_option = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For external users: DO NOT USE. We are in the process of open sourcing
|
||||
* extension declaration and executing internal cleanups before it can be
|
||||
* used externally.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration>
|
||||
*/
|
||||
public function getDeclaration()
|
||||
{
|
||||
return $this->declaration;
|
||||
}
|
||||
|
||||
/**
|
||||
* For external users: DO NOT USE. We are in the process of open sourcing
|
||||
* extension declaration and executing internal cleanups before it can be
|
||||
* used externally.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code>
|
||||
* @param \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeclaration($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration::class);
|
||||
$this->declaration = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getFeatures()
|
||||
{
|
||||
return $this->features;
|
||||
}
|
||||
|
||||
public function hasFeatures()
|
||||
{
|
||||
return isset($this->features);
|
||||
}
|
||||
|
||||
public function clearFeatures()
|
||||
{
|
||||
unset($this->features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The verification state of the range.
|
||||
* TODO: flip the default to DECLARATION once all empty ranges
|
||||
* are marked as UNVERIFIED.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getVerification()
|
||||
{
|
||||
return isset($this->verification) ? $this->verification : 0;
|
||||
}
|
||||
|
||||
public function hasVerification()
|
||||
{
|
||||
return isset($this->verification);
|
||||
}
|
||||
|
||||
public function clearVerification()
|
||||
{
|
||||
unset($this->verification);
|
||||
}
|
||||
|
||||
/**
|
||||
* The verification state of the range.
|
||||
* TODO: flip the default to DECLARATION once all empty ranges
|
||||
* are marked as UNVERIFIED.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setVerification($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\ExtensionRangeOptions\VerificationState::class);
|
||||
$this->verification = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
278
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php
vendored
Normal file
278
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php
vendored
Normal file
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\ExtensionRangeOptions;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions.Declaration</code>
|
||||
*/
|
||||
class Declaration extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The extension number declared within the extension range.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 number = 1;</code>
|
||||
*/
|
||||
protected $number = null;
|
||||
/**
|
||||
* The fully-qualified name of the extension field. There must be a leading
|
||||
* dot in front of the full name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string full_name = 2;</code>
|
||||
*/
|
||||
protected $full_name = null;
|
||||
/**
|
||||
* The fully-qualified type name of the extension field. Unlike
|
||||
* Metadata.type, Declaration.type must have a leading dot for messages
|
||||
* and enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type = 3;</code>
|
||||
*/
|
||||
protected $type = null;
|
||||
/**
|
||||
* If true, indicates that the number is reserved in the extension range,
|
||||
* and any extension field with the number will fail to compile. Set this
|
||||
* when a declared extension field is deleted.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool reserved = 5;</code>
|
||||
*/
|
||||
protected $reserved = null;
|
||||
/**
|
||||
* If true, indicates that the extension must be defined as repeated.
|
||||
* Otherwise the extension must be defined as optional.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool repeated = 6;</code>
|
||||
*/
|
||||
protected $repeated = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $number
|
||||
* The extension number declared within the extension range.
|
||||
* @type string $full_name
|
||||
* The fully-qualified name of the extension field. There must be a leading
|
||||
* dot in front of the full name.
|
||||
* @type string $type
|
||||
* The fully-qualified type name of the extension field. Unlike
|
||||
* Metadata.type, Declaration.type must have a leading dot for messages
|
||||
* and enums.
|
||||
* @type bool $reserved
|
||||
* If true, indicates that the number is reserved in the extension range,
|
||||
* and any extension field with the number will fail to compile. Set this
|
||||
* when a declared extension field is deleted.
|
||||
* @type bool $repeated
|
||||
* If true, indicates that the extension must be defined as repeated.
|
||||
* Otherwise the extension must be defined as optional.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The extension number declared within the extension range.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 number = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return isset($this->number) ? $this->number : 0;
|
||||
}
|
||||
|
||||
public function hasNumber()
|
||||
{
|
||||
return isset($this->number);
|
||||
}
|
||||
|
||||
public function clearNumber()
|
||||
{
|
||||
unset($this->number);
|
||||
}
|
||||
|
||||
/**
|
||||
* The extension number declared within the extension range.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 number = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->number = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully-qualified name of the extension field. There must be a leading
|
||||
* dot in front of the full name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string full_name = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getFullName()
|
||||
{
|
||||
return isset($this->full_name) ? $this->full_name : '';
|
||||
}
|
||||
|
||||
public function hasFullName()
|
||||
{
|
||||
return isset($this->full_name);
|
||||
}
|
||||
|
||||
public function clearFullName()
|
||||
{
|
||||
unset($this->full_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully-qualified name of the extension field. There must be a leading
|
||||
* dot in front of the full name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string full_name = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFullName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->full_name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully-qualified type name of the extension field. Unlike
|
||||
* Metadata.type, Declaration.type must have a leading dot for messages
|
||||
* and enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type = 3;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return isset($this->type) ? $this->type : '';
|
||||
}
|
||||
|
||||
public function hasType()
|
||||
{
|
||||
return isset($this->type);
|
||||
}
|
||||
|
||||
public function clearType()
|
||||
{
|
||||
unset($this->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* The fully-qualified type name of the extension field. Unlike
|
||||
* Metadata.type, Declaration.type must have a leading dot for messages
|
||||
* and enums.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type = 3;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->type = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, indicates that the number is reserved in the extension range,
|
||||
* and any extension field with the number will fail to compile. Set this
|
||||
* when a declared extension field is deleted.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool reserved = 5;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getReserved()
|
||||
{
|
||||
return isset($this->reserved) ? $this->reserved : false;
|
||||
}
|
||||
|
||||
public function hasReserved()
|
||||
{
|
||||
return isset($this->reserved);
|
||||
}
|
||||
|
||||
public function clearReserved()
|
||||
{
|
||||
unset($this->reserved);
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, indicates that the number is reserved in the extension range,
|
||||
* and any extension field with the number will fail to compile. Set this
|
||||
* when a declared extension field is deleted.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool reserved = 5;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReserved($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->reserved = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, indicates that the extension must be defined as repeated.
|
||||
* Otherwise the extension must be defined as optional.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool repeated = 6;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getRepeated()
|
||||
{
|
||||
return isset($this->repeated) ? $this->repeated : false;
|
||||
}
|
||||
|
||||
public function hasRepeated()
|
||||
{
|
||||
return isset($this->repeated);
|
||||
}
|
||||
|
||||
public function clearRepeated()
|
||||
{
|
||||
unset($this->repeated);
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, indicates that the extension must be defined as repeated.
|
||||
* Otherwise the extension must be defined as optional.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool repeated = 6;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setRepeated($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->repeated = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
53
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions/VerificationState.php
vendored
Normal file
53
vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions/VerificationState.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\ExtensionRangeOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* The verification state of the extension range.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.ExtensionRangeOptions.VerificationState</code>
|
||||
*/
|
||||
class VerificationState
|
||||
{
|
||||
/**
|
||||
* All the extensions of the range must be declared.
|
||||
*
|
||||
* Generated from protobuf enum <code>DECLARATION = 0;</code>
|
||||
*/
|
||||
const DECLARATION = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>UNVERIFIED = 1;</code>
|
||||
*/
|
||||
const UNVERIFIED = 1;
|
||||
|
||||
private static $valueToName = [
|
||||
self::DECLARATION => 'DECLARATION',
|
||||
self::UNVERIFIED => 'UNVERIFIED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
337
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet.php
vendored
Normal file
337
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet.php
vendored
Normal file
@@ -0,0 +1,337 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* TODO Enums in C++ gencode (and potentially other languages) are
|
||||
* not well scoped. This means that each of the feature enums below can clash
|
||||
* with each other. The short names we've chosen maximize call-site
|
||||
* readability, but leave us very open to this scenario. A future feature will
|
||||
* be designed and implemented to handle this, hopefully before we ever hit a
|
||||
* conflict here.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FeatureSet</code>
|
||||
*/
|
||||
class FeatureSet extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $field_presence = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $enum_type = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $repeated_field_encoding = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $utf8_validation = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $message_encoding = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $json_format = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnforceNamingStyle enforce_naming_style = 7 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, targets = TARGET_TYPE_EXTENSION_RANGE, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_ONEOF, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_ENUM_ENTRY, targets = TARGET_TYPE_SERVICE, targets = TARGET_TYPE_METHOD, edition_defaults = {</code>
|
||||
*/
|
||||
protected $enforce_naming_style = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
*/
|
||||
protected $default_symbol_visibility = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $field_presence
|
||||
* @type int $enum_type
|
||||
* @type int $repeated_field_encoding
|
||||
* @type int $utf8_validation
|
||||
* @type int $message_encoding
|
||||
* @type int $json_format
|
||||
* @type int $enforce_naming_style
|
||||
* @type int $default_symbol_visibility
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getFieldPresence()
|
||||
{
|
||||
return isset($this->field_presence) ? $this->field_presence : 0;
|
||||
}
|
||||
|
||||
public function hasFieldPresence()
|
||||
{
|
||||
return isset($this->field_presence);
|
||||
}
|
||||
|
||||
public function clearFieldPresence()
|
||||
{
|
||||
unset($this->field_presence);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFieldPresence($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\FieldPresence::class);
|
||||
$this->field_presence = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnumType()
|
||||
{
|
||||
return isset($this->enum_type) ? $this->enum_type : 0;
|
||||
}
|
||||
|
||||
public function hasEnumType()
|
||||
{
|
||||
return isset($this->enum_type);
|
||||
}
|
||||
|
||||
public function clearEnumType()
|
||||
{
|
||||
unset($this->enum_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnumType($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\EnumType::class);
|
||||
$this->enum_type = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getRepeatedFieldEncoding()
|
||||
{
|
||||
return isset($this->repeated_field_encoding) ? $this->repeated_field_encoding : 0;
|
||||
}
|
||||
|
||||
public function hasRepeatedFieldEncoding()
|
||||
{
|
||||
return isset($this->repeated_field_encoding);
|
||||
}
|
||||
|
||||
public function clearRepeatedFieldEncoding()
|
||||
{
|
||||
unset($this->repeated_field_encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setRepeatedFieldEncoding($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\RepeatedFieldEncoding::class);
|
||||
$this->repeated_field_encoding = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getUtf8Validation()
|
||||
{
|
||||
return isset($this->utf8_validation) ? $this->utf8_validation : 0;
|
||||
}
|
||||
|
||||
public function hasUtf8Validation()
|
||||
{
|
||||
return isset($this->utf8_validation);
|
||||
}
|
||||
|
||||
public function clearUtf8Validation()
|
||||
{
|
||||
unset($this->utf8_validation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUtf8Validation($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\Utf8Validation::class);
|
||||
$this->utf8_validation = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getMessageEncoding()
|
||||
{
|
||||
return isset($this->message_encoding) ? $this->message_encoding : 0;
|
||||
}
|
||||
|
||||
public function hasMessageEncoding()
|
||||
{
|
||||
return isset($this->message_encoding);
|
||||
}
|
||||
|
||||
public function clearMessageEncoding()
|
||||
{
|
||||
unset($this->message_encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessageEncoding($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\MessageEncoding::class);
|
||||
$this->message_encoding = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getJsonFormat()
|
||||
{
|
||||
return isset($this->json_format) ? $this->json_format : 0;
|
||||
}
|
||||
|
||||
public function hasJsonFormat()
|
||||
{
|
||||
return isset($this->json_format);
|
||||
}
|
||||
|
||||
public function clearJsonFormat()
|
||||
{
|
||||
unset($this->json_format);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setJsonFormat($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\JsonFormat::class);
|
||||
$this->json_format = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnforceNamingStyle enforce_naming_style = 7 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, targets = TARGET_TYPE_EXTENSION_RANGE, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_ONEOF, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_ENUM_ENTRY, targets = TARGET_TYPE_SERVICE, targets = TARGET_TYPE_METHOD, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnforceNamingStyle()
|
||||
{
|
||||
return isset($this->enforce_naming_style) ? $this->enforce_naming_style : 0;
|
||||
}
|
||||
|
||||
public function hasEnforceNamingStyle()
|
||||
{
|
||||
return isset($this->enforce_naming_style);
|
||||
}
|
||||
|
||||
public function clearEnforceNamingStyle()
|
||||
{
|
||||
unset($this->enforce_naming_style);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.EnforceNamingStyle enforce_naming_style = 7 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, targets = TARGET_TYPE_EXTENSION_RANGE, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_ONEOF, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_ENUM_ENTRY, targets = TARGET_TYPE_SERVICE, targets = TARGET_TYPE_METHOD, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnforceNamingStyle($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\EnforceNamingStyle::class);
|
||||
$this->enforce_naming_style = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getDefaultSymbolVisibility()
|
||||
{
|
||||
return isset($this->default_symbol_visibility) ? $this->default_symbol_visibility : 0;
|
||||
}
|
||||
|
||||
public function hasDefaultSymbolVisibility()
|
||||
{
|
||||
return isset($this->default_symbol_visibility);
|
||||
}
|
||||
|
||||
public function clearDefaultSymbolVisibility()
|
||||
{
|
||||
unset($this->default_symbol_visibility);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, edition_defaults = {</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultSymbolVisibility($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FeatureSet\VisibilityFeature\DefaultSymbolVisibility::class);
|
||||
$this->default_symbol_visibility = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/EnforceNamingStyle.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/EnforceNamingStyle.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.EnforceNamingStyle</code>
|
||||
*/
|
||||
class EnforceNamingStyle
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>ENFORCE_NAMING_STYLE_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const ENFORCE_NAMING_STYLE_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>STYLE2024 = 1;</code>
|
||||
*/
|
||||
const STYLE2024 = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>STYLE_LEGACY = 2;</code>
|
||||
*/
|
||||
const STYLE_LEGACY = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::ENFORCE_NAMING_STYLE_UNKNOWN => 'ENFORCE_NAMING_STYLE_UNKNOWN',
|
||||
self::STYLE2024 => 'STYLE2024',
|
||||
self::STYLE_LEGACY => 'STYLE_LEGACY',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/EnumType.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/EnumType.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.EnumType</code>
|
||||
*/
|
||||
class EnumType
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>ENUM_TYPE_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const ENUM_TYPE_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>OPEN = 1;</code>
|
||||
*/
|
||||
const OPEN = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>CLOSED = 2;</code>
|
||||
*/
|
||||
const CLOSED = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::ENUM_TYPE_UNKNOWN => 'ENUM_TYPE_UNKNOWN',
|
||||
self::OPEN => 'OPEN',
|
||||
self::CLOSED => 'CLOSED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
59
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/FieldPresence.php
vendored
Normal file
59
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/FieldPresence.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.FieldPresence</code>
|
||||
*/
|
||||
class FieldPresence
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>FIELD_PRESENCE_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const FIELD_PRESENCE_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EXPLICIT = 1;</code>
|
||||
*/
|
||||
const EXPLICIT = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>IMPLICIT = 2;</code>
|
||||
*/
|
||||
const IMPLICIT = 2;
|
||||
/**
|
||||
* Generated from protobuf enum <code>LEGACY_REQUIRED = 3;</code>
|
||||
*/
|
||||
const LEGACY_REQUIRED = 3;
|
||||
|
||||
private static $valueToName = [
|
||||
self::FIELD_PRESENCE_UNKNOWN => 'FIELD_PRESENCE_UNKNOWN',
|
||||
self::EXPLICIT => 'EXPLICIT',
|
||||
self::IMPLICIT => 'IMPLICIT',
|
||||
self::LEGACY_REQUIRED => 'LEGACY_REQUIRED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/JsonFormat.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/JsonFormat.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.JsonFormat</code>
|
||||
*/
|
||||
class JsonFormat
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>JSON_FORMAT_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const JSON_FORMAT_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>ALLOW = 1;</code>
|
||||
*/
|
||||
const ALLOW = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>LEGACY_BEST_EFFORT = 2;</code>
|
||||
*/
|
||||
const LEGACY_BEST_EFFORT = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::JSON_FORMAT_UNKNOWN => 'JSON_FORMAT_UNKNOWN',
|
||||
self::ALLOW => 'ALLOW',
|
||||
self::LEGACY_BEST_EFFORT => 'LEGACY_BEST_EFFORT',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/MessageEncoding.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/MessageEncoding.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.MessageEncoding</code>
|
||||
*/
|
||||
class MessageEncoding
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>MESSAGE_ENCODING_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const MESSAGE_ENCODING_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>LENGTH_PREFIXED = 1;</code>
|
||||
*/
|
||||
const LENGTH_PREFIXED = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>DELIMITED = 2;</code>
|
||||
*/
|
||||
const DELIMITED = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::MESSAGE_ENCODING_UNKNOWN => 'MESSAGE_ENCODING_UNKNOWN',
|
||||
self::LENGTH_PREFIXED => 'LENGTH_PREFIXED',
|
||||
self::DELIMITED => 'DELIMITED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/RepeatedFieldEncoding.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/RepeatedFieldEncoding.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.RepeatedFieldEncoding</code>
|
||||
*/
|
||||
class RepeatedFieldEncoding
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>REPEATED_FIELD_ENCODING_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const REPEATED_FIELD_ENCODING_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>PACKED = 1;</code>
|
||||
*/
|
||||
const PACKED = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>EXPANDED = 2;</code>
|
||||
*/
|
||||
const EXPANDED = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::REPEATED_FIELD_ENCODING_UNKNOWN => 'REPEATED_FIELD_ENCODING_UNKNOWN',
|
||||
self::PACKED => 'PACKED',
|
||||
self::EXPANDED => 'EXPANDED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/Utf8Validation.php
vendored
Normal file
54
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/Utf8Validation.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.Utf8Validation</code>
|
||||
*/
|
||||
class Utf8Validation
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>UTF8_VALIDATION_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const UTF8_VALIDATION_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>VERIFY = 2;</code>
|
||||
*/
|
||||
const VERIFY = 2;
|
||||
/**
|
||||
* Generated from protobuf enum <code>NONE = 3;</code>
|
||||
*/
|
||||
const NONE = 3;
|
||||
|
||||
private static $valueToName = [
|
||||
self::UTF8_VALIDATION_UNKNOWN => 'UTF8_VALIDATION_UNKNOWN',
|
||||
self::VERIFY => 'VERIFY',
|
||||
self::NONE => 'NONE',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
34
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/VisibilityFeature.php
vendored
Normal file
34
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSet/VisibilityFeature.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.FeatureSet.VisibilityFeature</code>
|
||||
*/
|
||||
class VisibilityFeature extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSet\VisibilityFeature;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility</code>
|
||||
*/
|
||||
class DefaultSymbolVisibility
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
|
||||
/**
|
||||
* Default pre-EDITION_2024, all UNSET visibility are export.
|
||||
*
|
||||
* Generated from protobuf enum <code>EXPORT_ALL = 1;</code>
|
||||
*/
|
||||
const EXPORT_ALL = 1;
|
||||
/**
|
||||
* All top-level symbols default to export, nested default to local.
|
||||
*
|
||||
* Generated from protobuf enum <code>EXPORT_TOP_LEVEL = 2;</code>
|
||||
*/
|
||||
const EXPORT_TOP_LEVEL = 2;
|
||||
/**
|
||||
* All symbols default to local.
|
||||
*
|
||||
* Generated from protobuf enum <code>LOCAL_ALL = 3;</code>
|
||||
*/
|
||||
const LOCAL_ALL = 3;
|
||||
/**
|
||||
* All symbols local by default. Nested types cannot be exported.
|
||||
* With special case caveat for message { enum {} reserved 1 to max; }
|
||||
* This is the recommended setting for new protos.
|
||||
*
|
||||
* Generated from protobuf enum <code>STRICT = 4;</code>
|
||||
*/
|
||||
const STRICT = 4;
|
||||
|
||||
private static $valueToName = [
|
||||
self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN => 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN',
|
||||
self::EXPORT_ALL => 'EXPORT_ALL',
|
||||
self::EXPORT_TOP_LEVEL => 'EXPORT_TOP_LEVEL',
|
||||
self::LOCAL_ALL => 'LOCAL_ALL',
|
||||
self::STRICT => 'STRICT',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
162
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSetDefaults.php
vendored
Normal file
162
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSetDefaults.php
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* A compiled specification for the defaults of a set of features. These
|
||||
* messages are generated from FeatureSet extensions and can be used to seed
|
||||
* feature resolution. The resolution with this object becomes a simple search
|
||||
* for the closest matching edition, followed by proto merges.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FeatureSetDefaults</code>
|
||||
*/
|
||||
class FeatureSetDefaults extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1;</code>
|
||||
*/
|
||||
private $defaults;
|
||||
/**
|
||||
* The minimum supported edition (inclusive) when this was constructed.
|
||||
* Editions before this will not have defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition minimum_edition = 4;</code>
|
||||
*/
|
||||
protected $minimum_edition = null;
|
||||
/**
|
||||
* The maximum known edition (inclusive) when this was constructed. Editions
|
||||
* after this will not have reliable defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition maximum_edition = 5;</code>
|
||||
*/
|
||||
protected $maximum_edition = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault[] $defaults
|
||||
* @type int $minimum_edition
|
||||
* The minimum supported edition (inclusive) when this was constructed.
|
||||
* Editions before this will not have defaults.
|
||||
* @type int $maximum_edition
|
||||
* The maximum known edition (inclusive) when this was constructed. Editions
|
||||
* after this will not have reliable defaults.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault>
|
||||
*/
|
||||
public function getDefaults()
|
||||
{
|
||||
return $this->defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaults($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault::class);
|
||||
$this->defaults = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimum supported edition (inclusive) when this was constructed.
|
||||
* Editions before this will not have defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition minimum_edition = 4;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getMinimumEdition()
|
||||
{
|
||||
return isset($this->minimum_edition) ? $this->minimum_edition : 0;
|
||||
}
|
||||
|
||||
public function hasMinimumEdition()
|
||||
{
|
||||
return isset($this->minimum_edition);
|
||||
}
|
||||
|
||||
public function clearMinimumEdition()
|
||||
{
|
||||
unset($this->minimum_edition);
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimum supported edition (inclusive) when this was constructed.
|
||||
* Editions before this will not have defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition minimum_edition = 4;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMinimumEdition($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->minimum_edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The maximum known edition (inclusive) when this was constructed. Editions
|
||||
* after this will not have reliable defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition maximum_edition = 5;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getMaximumEdition()
|
||||
{
|
||||
return isset($this->maximum_edition) ? $this->maximum_edition : 0;
|
||||
}
|
||||
|
||||
public function hasMaximumEdition()
|
||||
{
|
||||
return isset($this->maximum_edition);
|
||||
}
|
||||
|
||||
public function clearMaximumEdition()
|
||||
{
|
||||
unset($this->maximum_edition);
|
||||
}
|
||||
|
||||
/**
|
||||
* The maximum known edition (inclusive) when this was constructed. Editions
|
||||
* after this will not have reliable defaults.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition maximum_edition = 5;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMaximumEdition($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->maximum_edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
164
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php
vendored
Normal file
164
vendor/google/protobuf/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FeatureSetDefaults;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* A map from every known edition with a unique set of defaults to its
|
||||
* defaults. Not all editions may be contained here. For a given edition,
|
||||
* the defaults at the closest matching edition ordered at or before it should
|
||||
* be used. This field must be in strict ascending order by edition.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault</code>
|
||||
*/
|
||||
class FeatureSetEditionDefault extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
*/
|
||||
protected $edition = null;
|
||||
/**
|
||||
* Defaults of features that can be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet overridable_features = 4;</code>
|
||||
*/
|
||||
protected $overridable_features = null;
|
||||
/**
|
||||
* Defaults of features that can't be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet fixed_features = 5;</code>
|
||||
*/
|
||||
protected $fixed_features = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $edition
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $overridable_features
|
||||
* Defaults of features that can be overridden in this edition.
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $fixed_features
|
||||
* Defaults of features that can't be overridden in this edition.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEdition()
|
||||
{
|
||||
return isset($this->edition) ? $this->edition : 0;
|
||||
}
|
||||
|
||||
public function hasEdition()
|
||||
{
|
||||
return isset($this->edition);
|
||||
}
|
||||
|
||||
public function clearEdition()
|
||||
{
|
||||
unset($this->edition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEdition($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defaults of features that can be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet overridable_features = 4;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getOverridableFeatures()
|
||||
{
|
||||
return $this->overridable_features;
|
||||
}
|
||||
|
||||
public function hasOverridableFeatures()
|
||||
{
|
||||
return isset($this->overridable_features);
|
||||
}
|
||||
|
||||
public function clearOverridableFeatures()
|
||||
{
|
||||
unset($this->overridable_features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defaults of features that can be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet overridable_features = 4;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOverridableFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->overridable_features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defaults of features that can't be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet fixed_features = 5;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getFixedFeatures()
|
||||
{
|
||||
return $this->fixed_features;
|
||||
}
|
||||
|
||||
public function hasFixedFeatures()
|
||||
{
|
||||
return isset($this->fixed_features);
|
||||
}
|
||||
|
||||
public function clearFixedFeatures()
|
||||
{
|
||||
unset($this->fixed_features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defaults of features that can't be overridden in this edition.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet fixed_features = 5;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFixedFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->fixed_features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
308
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
vendored
Normal file
308
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
vendored
Normal file
@@ -0,0 +1,308 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class FieldDescriptor
|
||||
{
|
||||
use HasPublicDescriptorTrait;
|
||||
|
||||
private $name;
|
||||
private $json_name;
|
||||
private $setter;
|
||||
private $getter;
|
||||
private $number;
|
||||
private $label;
|
||||
private $type;
|
||||
private $message_type;
|
||||
private $enum_type;
|
||||
private $packed;
|
||||
private $oneof_index = -1;
|
||||
private $proto3_optional;
|
||||
|
||||
/** @var OneofDescriptor $containing_oneof */
|
||||
private $containing_oneof;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->public_desc = new \Google\Protobuf\FieldDescriptor($this);
|
||||
}
|
||||
|
||||
public function setOneofIndex($index)
|
||||
{
|
||||
$this->oneof_index = $index;
|
||||
}
|
||||
|
||||
public function getOneofIndex()
|
||||
{
|
||||
return $this->oneof_index;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setJsonName($json_name)
|
||||
{
|
||||
$this->json_name = $json_name;
|
||||
}
|
||||
|
||||
public function getJsonName()
|
||||
{
|
||||
return $this->json_name;
|
||||
}
|
||||
|
||||
public function setSetter($setter)
|
||||
{
|
||||
$this->setter = $setter;
|
||||
}
|
||||
|
||||
public function getSetter()
|
||||
{
|
||||
return $this->setter;
|
||||
}
|
||||
|
||||
public function setGetter($getter)
|
||||
{
|
||||
$this->getter = $getter;
|
||||
}
|
||||
|
||||
public function getGetter()
|
||||
{
|
||||
return $this->getter;
|
||||
}
|
||||
|
||||
public function setNumber($number)
|
||||
{
|
||||
$this->number = $number;
|
||||
}
|
||||
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
public function isRequired()
|
||||
{
|
||||
return $this->label === GPBLabel::REQUIRED;
|
||||
}
|
||||
|
||||
public function isRepeated()
|
||||
{
|
||||
return $this->label === GPBLabel::REPEATED;
|
||||
}
|
||||
|
||||
public function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function setMessageType($message_type)
|
||||
{
|
||||
$this->message_type = $message_type;
|
||||
}
|
||||
|
||||
public function getMessageType()
|
||||
{
|
||||
return $this->message_type;
|
||||
}
|
||||
|
||||
public function setEnumType($enum_type)
|
||||
{
|
||||
$this->enum_type = $enum_type;
|
||||
}
|
||||
|
||||
public function getEnumType()
|
||||
{
|
||||
return $this->enum_type;
|
||||
}
|
||||
|
||||
public function setPacked($packed)
|
||||
{
|
||||
$this->packed = $packed;
|
||||
}
|
||||
|
||||
public function getPacked()
|
||||
{
|
||||
return $this->packed;
|
||||
}
|
||||
|
||||
public function getProto3Optional()
|
||||
{
|
||||
return $this->proto3_optional;
|
||||
}
|
||||
|
||||
public function setProto3Optional($proto3_optional)
|
||||
{
|
||||
$this->proto3_optional = $proto3_optional;
|
||||
}
|
||||
|
||||
public function getContainingOneof()
|
||||
{
|
||||
return $this->containing_oneof;
|
||||
}
|
||||
|
||||
public function setContainingOneof($containing_oneof)
|
||||
{
|
||||
$this->containing_oneof = $containing_oneof;
|
||||
}
|
||||
|
||||
public function getRealContainingOneof()
|
||||
{
|
||||
return !is_null($this->containing_oneof) && !$this->containing_oneof->isSynthetic()
|
||||
? $this->containing_oneof : null;
|
||||
}
|
||||
|
||||
public function isPackable()
|
||||
{
|
||||
return $this->isRepeated() && self::isTypePackable($this->type);
|
||||
}
|
||||
|
||||
public function isMap()
|
||||
{
|
||||
return $this->getType() == GPBType::MESSAGE &&
|
||||
!is_null($this->getMessageType()->getOptions()) &&
|
||||
$this->getMessageType()->getOptions()->getMapEntry();
|
||||
}
|
||||
|
||||
public function isTimestamp()
|
||||
{
|
||||
return $this->getType() == GPBType::MESSAGE &&
|
||||
$this->getMessageType()->getClass() === "Google\Protobuf\Timestamp";
|
||||
}
|
||||
|
||||
public function isWrapperType()
|
||||
{
|
||||
if ($this->getType() == GPBType::MESSAGE) {
|
||||
$class = $this->getMessageType()->getClass();
|
||||
return in_array($class, [
|
||||
"Google\Protobuf\DoubleValue",
|
||||
"Google\Protobuf\FloatValue",
|
||||
"Google\Protobuf\Int64Value",
|
||||
"Google\Protobuf\UInt64Value",
|
||||
"Google\Protobuf\Int32Value",
|
||||
"Google\Protobuf\UInt32Value",
|
||||
"Google\Protobuf\BoolValue",
|
||||
"Google\Protobuf\StringValue",
|
||||
"Google\Protobuf\BytesValue",
|
||||
]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static function isTypePackable($field_type)
|
||||
{
|
||||
return ($field_type !== GPBType::STRING &&
|
||||
$field_type !== GPBType::GROUP &&
|
||||
$field_type !== GPBType::MESSAGE &&
|
||||
$field_type !== GPBType::BYTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FieldDescriptorProto $proto
|
||||
* @return FieldDescriptor
|
||||
*/
|
||||
public static function getFieldDescriptor($proto)
|
||||
{
|
||||
$type_name = null;
|
||||
$type = $proto->getType();
|
||||
switch ($type) {
|
||||
case GPBType::MESSAGE:
|
||||
case GPBType::GROUP:
|
||||
case GPBType::ENUM:
|
||||
$type_name = $proto->getTypeName();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$oneof_index = $proto->hasOneofIndex() ? $proto->getOneofIndex() : -1;
|
||||
// TODO: once proto2 is supported, this default should be false
|
||||
// for proto2.
|
||||
if ($proto->getLabel() === GPBLabel::REPEATED &&
|
||||
$proto->getType() !== GPBType::MESSAGE &&
|
||||
$proto->getType() !== GPBType::GROUP &&
|
||||
$proto->getType() !== GPBType::STRING &&
|
||||
$proto->getType() !== GPBType::BYTES) {
|
||||
$packed = true;
|
||||
} else {
|
||||
$packed = false;
|
||||
}
|
||||
$options = $proto->getOptions();
|
||||
if ($options !== null) {
|
||||
$packed = $options->getPacked();
|
||||
}
|
||||
|
||||
$field = new FieldDescriptor();
|
||||
$field->setName($proto->getName());
|
||||
|
||||
if ($proto->hasJsonName()) {
|
||||
$json_name = $proto->getJsonName();
|
||||
} else {
|
||||
$proto_name = $proto->getName();
|
||||
$json_name = implode('', array_map('ucwords', explode('_', $proto_name)));
|
||||
if ($proto_name[0] !== "_" && !ctype_upper($proto_name[0])) {
|
||||
$json_name = lcfirst($json_name);
|
||||
}
|
||||
}
|
||||
$field->setJsonName($json_name);
|
||||
|
||||
$camel_name = implode('', array_map('ucwords', explode('_', $proto->getName())));
|
||||
$field->setGetter('get' . $camel_name);
|
||||
$field->setSetter('set' . $camel_name);
|
||||
$field->setType($proto->getType());
|
||||
$field->setNumber($proto->getNumber());
|
||||
$field->setLabel($proto->getLabel());
|
||||
$field->setPacked($packed);
|
||||
$field->setOneofIndex($oneof_index);
|
||||
$field->setProto3Optional($proto->getProto3Optional());
|
||||
|
||||
// At this time, the message/enum type may have not been added to pool.
|
||||
// So we use the type name as place holder and will replace it with the
|
||||
// actual descriptor in cross building.
|
||||
switch ($type) {
|
||||
case GPBType::MESSAGE:
|
||||
$field->setMessageType($type_name);
|
||||
break;
|
||||
case GPBType::ENUM:
|
||||
$field->setEnumType($type_name);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return $field;
|
||||
}
|
||||
|
||||
public static function buildFromProto($proto)
|
||||
{
|
||||
return FieldDescriptor::getFieldDescriptor($proto);
|
||||
}
|
||||
}
|
||||
612
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
vendored
Normal file
612
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
vendored
Normal file
@@ -0,0 +1,612 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes a field within a message.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code>
|
||||
*/
|
||||
class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
*/
|
||||
protected $name = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 3;</code>
|
||||
*/
|
||||
protected $number = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
|
||||
*/
|
||||
protected $label = null;
|
||||
/**
|
||||
* If type_name is set, this need not be set. If both this and type_name
|
||||
* are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
|
||||
*/
|
||||
protected $type = null;
|
||||
/**
|
||||
* For message and enum types, this is the name of the type. If the name
|
||||
* starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
||||
* rules are used to find the type (i.e. first the nested types within this
|
||||
* message are searched, then within the parent, on up to the root
|
||||
* namespace).
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type_name = 6;</code>
|
||||
*/
|
||||
protected $type_name = null;
|
||||
/**
|
||||
* For extensions, this is the name of the type being extended. It is
|
||||
* resolved in the same manner as type_name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string extendee = 2;</code>
|
||||
*/
|
||||
protected $extendee = null;
|
||||
/**
|
||||
* For numeric types, contains the original text representation of the value.
|
||||
* For booleans, "true" or "false".
|
||||
* For strings, contains the default text contents (not escaped in any way).
|
||||
* For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string default_value = 7;</code>
|
||||
*/
|
||||
protected $default_value = null;
|
||||
/**
|
||||
* If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
* list. This field is a member of that oneof.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 oneof_index = 9;</code>
|
||||
*/
|
||||
protected $oneof_index = null;
|
||||
/**
|
||||
* JSON name of this field. The value is set by protocol compiler. If the
|
||||
* user has set a "json_name" option on this field, that option's value
|
||||
* will be used. Otherwise, it's deduced from the field's name by converting
|
||||
* it to camelCase.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string json_name = 10;</code>
|
||||
*/
|
||||
protected $json_name = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
/**
|
||||
* If true, this is a proto3 "optional". When a proto3 field is optional, it
|
||||
* tracks presence regardless of field type.
|
||||
* When proto3_optional is true, this field must belong to a oneof to signal
|
||||
* to old proto3 clients that presence is tracked for this field. This oneof
|
||||
* is known as a "synthetic" oneof, and this field must be its sole member
|
||||
* (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
|
||||
* exist in the descriptor only, and do not generate any API. Synthetic oneofs
|
||||
* must be ordered after all "real" oneofs.
|
||||
* For message fields, proto3_optional doesn't create any semantic change,
|
||||
* since non-repeated message fields always track presence. However it still
|
||||
* indicates the semantic detail of whether the user wrote "optional" or not.
|
||||
* This can be useful for round-tripping the .proto file. For consistency we
|
||||
* give message fields a synthetic oneof also, even though it is not required
|
||||
* to track presence. This is especially important because the parser can't
|
||||
* tell if a field is a message or an enum, so it must always create a
|
||||
* synthetic oneof.
|
||||
* Proto2 optional fields do not set this flag, because they already indicate
|
||||
* optional with `LABEL_OPTIONAL`.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool proto3_optional = 17;</code>
|
||||
*/
|
||||
protected $proto3_optional = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* @type int $number
|
||||
* @type int $label
|
||||
* @type int $type
|
||||
* If type_name is set, this need not be set. If both this and type_name
|
||||
* are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
* @type string $type_name
|
||||
* For message and enum types, this is the name of the type. If the name
|
||||
* starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
||||
* rules are used to find the type (i.e. first the nested types within this
|
||||
* message are searched, then within the parent, on up to the root
|
||||
* namespace).
|
||||
* @type string $extendee
|
||||
* For extensions, this is the name of the type being extended. It is
|
||||
* resolved in the same manner as type_name.
|
||||
* @type string $default_value
|
||||
* For numeric types, contains the original text representation of the value.
|
||||
* For booleans, "true" or "false".
|
||||
* For strings, contains the default text contents (not escaped in any way).
|
||||
* For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
* @type int $oneof_index
|
||||
* If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
* list. This field is a member of that oneof.
|
||||
* @type string $json_name
|
||||
* JSON name of this field. The value is set by protocol compiler. If the
|
||||
* user has set a "json_name" option on this field, that option's value
|
||||
* will be used. Otherwise, it's deduced from the field's name by converting
|
||||
* it to camelCase.
|
||||
* @type \Google\Protobuf\Internal\FieldOptions $options
|
||||
* @type bool $proto3_optional
|
||||
* If true, this is a proto3 "optional". When a proto3 field is optional, it
|
||||
* tracks presence regardless of field type.
|
||||
* When proto3_optional is true, this field must belong to a oneof to signal
|
||||
* to old proto3 clients that presence is tracked for this field. This oneof
|
||||
* is known as a "synthetic" oneof, and this field must be its sole member
|
||||
* (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
|
||||
* exist in the descriptor only, and do not generate any API. Synthetic oneofs
|
||||
* must be ordered after all "real" oneofs.
|
||||
* For message fields, proto3_optional doesn't create any semantic change,
|
||||
* since non-repeated message fields always track presence. However it still
|
||||
* indicates the semantic detail of whether the user wrote "optional" or not.
|
||||
* This can be useful for round-tripping the .proto file. For consistency we
|
||||
* give message fields a synthetic oneof also, even though it is not required
|
||||
* to track presence. This is especially important because the parser can't
|
||||
* tell if a field is a message or an enum, so it must always create a
|
||||
* synthetic oneof.
|
||||
* Proto2 optional fields do not set this flag, because they already indicate
|
||||
* optional with `LABEL_OPTIONAL`.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->name) ? $this->name : '';
|
||||
}
|
||||
|
||||
public function hasName()
|
||||
{
|
||||
return isset($this->name);
|
||||
}
|
||||
|
||||
public function clearName()
|
||||
{
|
||||
unset($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 3;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return isset($this->number) ? $this->number : 0;
|
||||
}
|
||||
|
||||
public function hasNumber()
|
||||
{
|
||||
return isset($this->number);
|
||||
}
|
||||
|
||||
public function clearNumber()
|
||||
{
|
||||
unset($this->number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional int32 number = 3;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->number = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return isset($this->label) ? $this->label : 0;
|
||||
}
|
||||
|
||||
public function hasLabel()
|
||||
{
|
||||
return isset($this->label);
|
||||
}
|
||||
|
||||
public function clearLabel()
|
||||
{
|
||||
unset($this->label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabel($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Label::class);
|
||||
$this->label = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* If type_name is set, this need not be set. If both this and type_name
|
||||
* are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return isset($this->type) ? $this->type : 0;
|
||||
}
|
||||
|
||||
public function hasType()
|
||||
{
|
||||
return isset($this->type);
|
||||
}
|
||||
|
||||
public function clearType()
|
||||
{
|
||||
unset($this->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* If type_name is set, this need not be set. If both this and type_name
|
||||
* are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Type::class);
|
||||
$this->type = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For message and enum types, this is the name of the type. If the name
|
||||
* starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
||||
* rules are used to find the type (i.e. first the nested types within this
|
||||
* message are searched, then within the parent, on up to the root
|
||||
* namespace).
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type_name = 6;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getTypeName()
|
||||
{
|
||||
return isset($this->type_name) ? $this->type_name : '';
|
||||
}
|
||||
|
||||
public function hasTypeName()
|
||||
{
|
||||
return isset($this->type_name);
|
||||
}
|
||||
|
||||
public function clearTypeName()
|
||||
{
|
||||
unset($this->type_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* For message and enum types, this is the name of the type. If the name
|
||||
* starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
||||
* rules are used to find the type (i.e. first the nested types within this
|
||||
* message are searched, then within the parent, on up to the root
|
||||
* namespace).
|
||||
*
|
||||
* Generated from protobuf field <code>optional string type_name = 6;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setTypeName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->type_name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For extensions, this is the name of the type being extended. It is
|
||||
* resolved in the same manner as type_name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string extendee = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getExtendee()
|
||||
{
|
||||
return isset($this->extendee) ? $this->extendee : '';
|
||||
}
|
||||
|
||||
public function hasExtendee()
|
||||
{
|
||||
return isset($this->extendee);
|
||||
}
|
||||
|
||||
public function clearExtendee()
|
||||
{
|
||||
unset($this->extendee);
|
||||
}
|
||||
|
||||
/**
|
||||
* For extensions, this is the name of the type being extended. It is
|
||||
* resolved in the same manner as type_name.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string extendee = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtendee($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->extendee = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For numeric types, contains the original text representation of the value.
|
||||
* For booleans, "true" or "false".
|
||||
* For strings, contains the default text contents (not escaped in any way).
|
||||
* For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string default_value = 7;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultValue()
|
||||
{
|
||||
return isset($this->default_value) ? $this->default_value : '';
|
||||
}
|
||||
|
||||
public function hasDefaultValue()
|
||||
{
|
||||
return isset($this->default_value);
|
||||
}
|
||||
|
||||
public function clearDefaultValue()
|
||||
{
|
||||
unset($this->default_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* For numeric types, contains the original text representation of the value.
|
||||
* For booleans, "true" or "false".
|
||||
* For strings, contains the default text contents (not escaped in any way).
|
||||
* For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string default_value = 7;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultValue($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->default_value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
* list. This field is a member of that oneof.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 oneof_index = 9;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getOneofIndex()
|
||||
{
|
||||
return isset($this->oneof_index) ? $this->oneof_index : 0;
|
||||
}
|
||||
|
||||
public function hasOneofIndex()
|
||||
{
|
||||
return isset($this->oneof_index);
|
||||
}
|
||||
|
||||
public function clearOneofIndex()
|
||||
{
|
||||
unset($this->oneof_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
* list. This field is a member of that oneof.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 oneof_index = 9;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOneofIndex($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->oneof_index = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON name of this field. The value is set by protocol compiler. If the
|
||||
* user has set a "json_name" option on this field, that option's value
|
||||
* will be used. Otherwise, it's deduced from the field's name by converting
|
||||
* it to camelCase.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string json_name = 10;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getJsonName()
|
||||
{
|
||||
return isset($this->json_name) ? $this->json_name : '';
|
||||
}
|
||||
|
||||
public function hasJsonName()
|
||||
{
|
||||
return isset($this->json_name);
|
||||
}
|
||||
|
||||
public function clearJsonName()
|
||||
{
|
||||
unset($this->json_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON name of this field. The value is set by protocol compiler. If the
|
||||
* user has set a "json_name" option on this field, that option's value
|
||||
* will be used. Otherwise, it's deduced from the field's name by converting
|
||||
* it to camelCase.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string json_name = 10;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setJsonName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->json_name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
|
||||
* @return \Google\Protobuf\Internal\FieldOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, this is a proto3 "optional". When a proto3 field is optional, it
|
||||
* tracks presence regardless of field type.
|
||||
* When proto3_optional is true, this field must belong to a oneof to signal
|
||||
* to old proto3 clients that presence is tracked for this field. This oneof
|
||||
* is known as a "synthetic" oneof, and this field must be its sole member
|
||||
* (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
|
||||
* exist in the descriptor only, and do not generate any API. Synthetic oneofs
|
||||
* must be ordered after all "real" oneofs.
|
||||
* For message fields, proto3_optional doesn't create any semantic change,
|
||||
* since non-repeated message fields always track presence. However it still
|
||||
* indicates the semantic detail of whether the user wrote "optional" or not.
|
||||
* This can be useful for round-tripping the .proto file. For consistency we
|
||||
* give message fields a synthetic oneof also, even though it is not required
|
||||
* to track presence. This is especially important because the parser can't
|
||||
* tell if a field is a message or an enum, so it must always create a
|
||||
* synthetic oneof.
|
||||
* Proto2 optional fields do not set this flag, because they already indicate
|
||||
* optional with `LABEL_OPTIONAL`.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool proto3_optional = 17;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getProto3Optional()
|
||||
{
|
||||
return isset($this->proto3_optional) ? $this->proto3_optional : false;
|
||||
}
|
||||
|
||||
public function hasProto3Optional()
|
||||
{
|
||||
return isset($this->proto3_optional);
|
||||
}
|
||||
|
||||
public function clearProto3Optional()
|
||||
{
|
||||
unset($this->proto3_optional);
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, this is a proto3 "optional". When a proto3 field is optional, it
|
||||
* tracks presence regardless of field type.
|
||||
* When proto3_optional is true, this field must belong to a oneof to signal
|
||||
* to old proto3 clients that presence is tracked for this field. This oneof
|
||||
* is known as a "synthetic" oneof, and this field must be its sole member
|
||||
* (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
|
||||
* exist in the descriptor only, and do not generate any API. Synthetic oneofs
|
||||
* must be ordered after all "real" oneofs.
|
||||
* For message fields, proto3_optional doesn't create any semantic change,
|
||||
* since non-repeated message fields always track presence. However it still
|
||||
* indicates the semantic detail of whether the user wrote "optional" or not.
|
||||
* This can be useful for round-tripping the .proto file. For consistency we
|
||||
* give message fields a synthetic oneof also, even though it is not required
|
||||
* to track presence. This is especially important because the parser can't
|
||||
* tell if a field is a message or an enum, so it must always create a
|
||||
* synthetic oneof.
|
||||
* Proto2 optional fields do not set this flag, because they already indicate
|
||||
* optional with `LABEL_OPTIONAL`.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool proto3_optional = 17;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setProto3Optional($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->proto3_optional = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
60
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
vendored
Normal file
60
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldDescriptorProto;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FieldDescriptorProto.Label</code>
|
||||
*/
|
||||
class Label
|
||||
{
|
||||
/**
|
||||
* 0 is reserved for errors
|
||||
*
|
||||
* Generated from protobuf enum <code>LABEL_OPTIONAL = 1;</code>
|
||||
*/
|
||||
const LABEL_OPTIONAL = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>LABEL_REPEATED = 3;</code>
|
||||
*/
|
||||
const LABEL_REPEATED = 3;
|
||||
/**
|
||||
* The required label is only allowed in google.protobuf. In proto3 and Editions
|
||||
* it's explicitly prohibited. In Editions, the `field_presence` feature
|
||||
* can be used to get this behavior.
|
||||
*
|
||||
* Generated from protobuf enum <code>LABEL_REQUIRED = 2;</code>
|
||||
*/
|
||||
const LABEL_REQUIRED = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::LABEL_OPTIONAL => 'LABEL_OPTIONAL',
|
||||
self::LABEL_REPEATED => 'LABEL_REPEATED',
|
||||
self::LABEL_REQUIRED => 'LABEL_REQUIRED',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
152
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
vendored
Normal file
152
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldDescriptorProto;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FieldDescriptorProto.Type</code>
|
||||
*/
|
||||
class Type
|
||||
{
|
||||
/**
|
||||
* 0 is reserved for errors.
|
||||
* Order is weird for historical reasons.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
|
||||
*/
|
||||
const TYPE_DOUBLE = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
|
||||
*/
|
||||
const TYPE_FLOAT = 2;
|
||||
/**
|
||||
* Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
||||
* negative values are likely.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
|
||||
*/
|
||||
const TYPE_INT64 = 3;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
|
||||
*/
|
||||
const TYPE_UINT64 = 4;
|
||||
/**
|
||||
* Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
||||
* negative values are likely.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
|
||||
*/
|
||||
const TYPE_INT32 = 5;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
|
||||
*/
|
||||
const TYPE_FIXED64 = 6;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
|
||||
*/
|
||||
const TYPE_FIXED32 = 7;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
|
||||
*/
|
||||
const TYPE_BOOL = 8;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_STRING = 9;</code>
|
||||
*/
|
||||
const TYPE_STRING = 9;
|
||||
/**
|
||||
* Tag-delimited aggregate.
|
||||
* Group type is deprecated and not supported after google.protobuf. However, Proto3
|
||||
* implementations should still be able to parse the group wire format and
|
||||
* treat group fields as unknown fields. In Editions, the group wire format
|
||||
* can be enabled via the `message_encoding` feature.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
|
||||
*/
|
||||
const TYPE_GROUP = 10;
|
||||
/**
|
||||
* Length-delimited aggregate.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
|
||||
*/
|
||||
const TYPE_MESSAGE = 11;
|
||||
/**
|
||||
* New in version 2.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
|
||||
*/
|
||||
const TYPE_BYTES = 12;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
|
||||
*/
|
||||
const TYPE_UINT32 = 13;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
|
||||
*/
|
||||
const TYPE_ENUM = 14;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
|
||||
*/
|
||||
const TYPE_SFIXED32 = 15;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
|
||||
*/
|
||||
const TYPE_SFIXED64 = 16;
|
||||
/**
|
||||
* Uses ZigZag encoding.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
|
||||
*/
|
||||
const TYPE_SINT32 = 17;
|
||||
/**
|
||||
* Uses ZigZag encoding.
|
||||
*
|
||||
* Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
|
||||
*/
|
||||
const TYPE_SINT64 = 18;
|
||||
|
||||
private static $valueToName = [
|
||||
self::TYPE_DOUBLE => 'TYPE_DOUBLE',
|
||||
self::TYPE_FLOAT => 'TYPE_FLOAT',
|
||||
self::TYPE_INT64 => 'TYPE_INT64',
|
||||
self::TYPE_UINT64 => 'TYPE_UINT64',
|
||||
self::TYPE_INT32 => 'TYPE_INT32',
|
||||
self::TYPE_FIXED64 => 'TYPE_FIXED64',
|
||||
self::TYPE_FIXED32 => 'TYPE_FIXED32',
|
||||
self::TYPE_BOOL => 'TYPE_BOOL',
|
||||
self::TYPE_STRING => 'TYPE_STRING',
|
||||
self::TYPE_GROUP => 'TYPE_GROUP',
|
||||
self::TYPE_MESSAGE => 'TYPE_MESSAGE',
|
||||
self::TYPE_BYTES => 'TYPE_BYTES',
|
||||
self::TYPE_UINT32 => 'TYPE_UINT32',
|
||||
self::TYPE_ENUM => 'TYPE_ENUM',
|
||||
self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
|
||||
self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
|
||||
self::TYPE_SINT32 => 'TYPE_SINT32',
|
||||
self::TYPE_SINT64 => 'TYPE_SINT64',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
799
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
vendored
Normal file
799
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
vendored
Normal file
@@ -0,0 +1,799 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.FieldOptions</code>
|
||||
*/
|
||||
class FieldOptions extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
|
||||
* The ctype option instructs the C++ code generator to use a different
|
||||
* representation of the field than it normally would. See the specific
|
||||
* options below. This option is only implemented to support use of
|
||||
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
||||
* type "bytes" in the open source release.
|
||||
* TODO: make ctype actually deprecated.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
|
||||
*/
|
||||
protected $ctype = null;
|
||||
/**
|
||||
* The packed option can be enabled for repeated primitive fields to enable
|
||||
* a more efficient representation on the wire. Rather than repeatedly
|
||||
* writing the tag and type for each element, the entire array is encoded as
|
||||
* a single length-delimited blob. In proto3, only explicit setting it to
|
||||
* false will avoid using packed encoding. This option is prohibited in
|
||||
* Editions, but the `repeated_field_encoding` feature can be used to control
|
||||
* the behavior.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool packed = 2;</code>
|
||||
*/
|
||||
protected $packed = null;
|
||||
/**
|
||||
* The jstype option determines the JavaScript type used for values of the
|
||||
* field. The option is permitted only for 64 bit integral and fixed types
|
||||
* (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
||||
* is represented as JavaScript string, which avoids loss of precision that
|
||||
* can happen when a large value is converted to a floating point JavaScript.
|
||||
* Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
||||
* use the JavaScript "number" type. The behavior of the default option
|
||||
* JS_NORMAL is implementation dependent.
|
||||
* This option is an enum to permit additional types to be added, e.g.
|
||||
* goog.math.Integer.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
|
||||
*/
|
||||
protected $jstype = null;
|
||||
/**
|
||||
* Should this field be parsed lazily? Lazy applies only to message-type
|
||||
* fields. It means that when the outer message is initially parsed, the
|
||||
* inner message's contents will not be parsed but instead stored in encoded
|
||||
* form. The inner message will actually be parsed when it is first accessed.
|
||||
* This is only a hint. Implementations are free to choose whether to use
|
||||
* eager or lazy parsing regardless of the value of this option. However,
|
||||
* setting this option true suggests that the protocol author believes that
|
||||
* using lazy parsing on this field is worth the additional bookkeeping
|
||||
* overhead typically needed to implement it.
|
||||
* This option does not affect the public interface of any generated code;
|
||||
* all method signatures remain the same. Furthermore, thread-safety of the
|
||||
* interface is not affected by this option; const methods remain safe to
|
||||
* call from multiple threads concurrently, while non-const methods continue
|
||||
* to require exclusive access.
|
||||
* Note that lazy message fields are still eagerly verified to check
|
||||
* ill-formed wireformat or missing required fields. Calling IsInitialized()
|
||||
* on the outer message would fail if the inner message has missing required
|
||||
* fields. Failed verification would result in parsing failure (except when
|
||||
* uninitialized messages are acceptable).
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code>
|
||||
*/
|
||||
protected $lazy = null;
|
||||
/**
|
||||
* unverified_lazy does no correctness checks on the byte stream. This should
|
||||
* only be used where lazy with verification is prohibitive for performance
|
||||
* reasons.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool unverified_lazy = 15 [default = false];</code>
|
||||
*/
|
||||
protected $unverified_lazy = null;
|
||||
/**
|
||||
* Is this field deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for accessors, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating fields.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
*/
|
||||
protected $deprecated = null;
|
||||
/**
|
||||
* DEPRECATED. DO NOT USE!
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool weak = 10 [default = false, deprecated = true];</code>
|
||||
* @deprecated
|
||||
*/
|
||||
protected $weak = null;
|
||||
/**
|
||||
* Indicate that the field value should not be printed out when using debug
|
||||
* formats, e.g. when the field contains sensitive credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code>
|
||||
*/
|
||||
protected $debug_redact = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code>
|
||||
*/
|
||||
protected $retention = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code>
|
||||
*/
|
||||
private $targets;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code>
|
||||
*/
|
||||
private $edition_defaults;
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code>
|
||||
*/
|
||||
protected $features = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code>
|
||||
*/
|
||||
protected $feature_support = null;
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
*/
|
||||
private $uninterpreted_option;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $ctype
|
||||
* NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
|
||||
* The ctype option instructs the C++ code generator to use a different
|
||||
* representation of the field than it normally would. See the specific
|
||||
* options below. This option is only implemented to support use of
|
||||
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
||||
* type "bytes" in the open source release.
|
||||
* TODO: make ctype actually deprecated.
|
||||
* @type bool $packed
|
||||
* The packed option can be enabled for repeated primitive fields to enable
|
||||
* a more efficient representation on the wire. Rather than repeatedly
|
||||
* writing the tag and type for each element, the entire array is encoded as
|
||||
* a single length-delimited blob. In proto3, only explicit setting it to
|
||||
* false will avoid using packed encoding. This option is prohibited in
|
||||
* Editions, but the `repeated_field_encoding` feature can be used to control
|
||||
* the behavior.
|
||||
* @type int $jstype
|
||||
* The jstype option determines the JavaScript type used for values of the
|
||||
* field. The option is permitted only for 64 bit integral and fixed types
|
||||
* (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
||||
* is represented as JavaScript string, which avoids loss of precision that
|
||||
* can happen when a large value is converted to a floating point JavaScript.
|
||||
* Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
||||
* use the JavaScript "number" type. The behavior of the default option
|
||||
* JS_NORMAL is implementation dependent.
|
||||
* This option is an enum to permit additional types to be added, e.g.
|
||||
* goog.math.Integer.
|
||||
* @type bool $lazy
|
||||
* Should this field be parsed lazily? Lazy applies only to message-type
|
||||
* fields. It means that when the outer message is initially parsed, the
|
||||
* inner message's contents will not be parsed but instead stored in encoded
|
||||
* form. The inner message will actually be parsed when it is first accessed.
|
||||
* This is only a hint. Implementations are free to choose whether to use
|
||||
* eager or lazy parsing regardless of the value of this option. However,
|
||||
* setting this option true suggests that the protocol author believes that
|
||||
* using lazy parsing on this field is worth the additional bookkeeping
|
||||
* overhead typically needed to implement it.
|
||||
* This option does not affect the public interface of any generated code;
|
||||
* all method signatures remain the same. Furthermore, thread-safety of the
|
||||
* interface is not affected by this option; const methods remain safe to
|
||||
* call from multiple threads concurrently, while non-const methods continue
|
||||
* to require exclusive access.
|
||||
* Note that lazy message fields are still eagerly verified to check
|
||||
* ill-formed wireformat or missing required fields. Calling IsInitialized()
|
||||
* on the outer message would fail if the inner message has missing required
|
||||
* fields. Failed verification would result in parsing failure (except when
|
||||
* uninitialized messages are acceptable).
|
||||
* @type bool $unverified_lazy
|
||||
* unverified_lazy does no correctness checks on the byte stream. This should
|
||||
* only be used where lazy with verification is prohibitive for performance
|
||||
* reasons.
|
||||
* @type bool $deprecated
|
||||
* Is this field deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for accessors, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating fields.
|
||||
* @type bool $weak
|
||||
* DEPRECATED. DO NOT USE!
|
||||
* For Google-internal migration only. Do not use.
|
||||
* @type bool $debug_redact
|
||||
* Indicate that the field value should not be printed out when using debug
|
||||
* formats, e.g. when the field contains sensitive credentials.
|
||||
* @type int $retention
|
||||
* @type int[] $targets
|
||||
* @type \Google\Protobuf\Internal\FieldOptions\EditionDefault[] $edition_defaults
|
||||
* @type \Google\Protobuf\Internal\FeatureSet $features
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
* @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support
|
||||
* @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
|
||||
* The ctype option instructs the C++ code generator to use a different
|
||||
* representation of the field than it normally would. See the specific
|
||||
* options below. This option is only implemented to support use of
|
||||
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
||||
* type "bytes" in the open source release.
|
||||
* TODO: make ctype actually deprecated.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getCtype()
|
||||
{
|
||||
return isset($this->ctype) ? $this->ctype : 0;
|
||||
}
|
||||
|
||||
public function hasCtype()
|
||||
{
|
||||
return isset($this->ctype);
|
||||
}
|
||||
|
||||
public function clearCtype()
|
||||
{
|
||||
unset($this->ctype);
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
|
||||
* The ctype option instructs the C++ code generator to use a different
|
||||
* representation of the field than it normally would. See the specific
|
||||
* options below. This option is only implemented to support use of
|
||||
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
||||
* type "bytes" in the open source release.
|
||||
* TODO: make ctype actually deprecated.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setCtype($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\CType::class);
|
||||
$this->ctype = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The packed option can be enabled for repeated primitive fields to enable
|
||||
* a more efficient representation on the wire. Rather than repeatedly
|
||||
* writing the tag and type for each element, the entire array is encoded as
|
||||
* a single length-delimited blob. In proto3, only explicit setting it to
|
||||
* false will avoid using packed encoding. This option is prohibited in
|
||||
* Editions, but the `repeated_field_encoding` feature can be used to control
|
||||
* the behavior.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool packed = 2;</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getPacked()
|
||||
{
|
||||
return isset($this->packed) ? $this->packed : false;
|
||||
}
|
||||
|
||||
public function hasPacked()
|
||||
{
|
||||
return isset($this->packed);
|
||||
}
|
||||
|
||||
public function clearPacked()
|
||||
{
|
||||
unset($this->packed);
|
||||
}
|
||||
|
||||
/**
|
||||
* The packed option can be enabled for repeated primitive fields to enable
|
||||
* a more efficient representation on the wire. Rather than repeatedly
|
||||
* writing the tag and type for each element, the entire array is encoded as
|
||||
* a single length-delimited blob. In proto3, only explicit setting it to
|
||||
* false will avoid using packed encoding. This option is prohibited in
|
||||
* Editions, but the `repeated_field_encoding` feature can be used to control
|
||||
* the behavior.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool packed = 2;</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPacked($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->packed = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The jstype option determines the JavaScript type used for values of the
|
||||
* field. The option is permitted only for 64 bit integral and fixed types
|
||||
* (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
||||
* is represented as JavaScript string, which avoids loss of precision that
|
||||
* can happen when a large value is converted to a floating point JavaScript.
|
||||
* Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
||||
* use the JavaScript "number" type. The behavior of the default option
|
||||
* JS_NORMAL is implementation dependent.
|
||||
* This option is an enum to permit additional types to be added, e.g.
|
||||
* goog.math.Integer.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getJstype()
|
||||
{
|
||||
return isset($this->jstype) ? $this->jstype : 0;
|
||||
}
|
||||
|
||||
public function hasJstype()
|
||||
{
|
||||
return isset($this->jstype);
|
||||
}
|
||||
|
||||
public function clearJstype()
|
||||
{
|
||||
unset($this->jstype);
|
||||
}
|
||||
|
||||
/**
|
||||
* The jstype option determines the JavaScript type used for values of the
|
||||
* field. The option is permitted only for 64 bit integral and fixed types
|
||||
* (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
||||
* is represented as JavaScript string, which avoids loss of precision that
|
||||
* can happen when a large value is converted to a floating point JavaScript.
|
||||
* Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
||||
* use the JavaScript "number" type. The behavior of the default option
|
||||
* JS_NORMAL is implementation dependent.
|
||||
* This option is an enum to permit additional types to be added, e.g.
|
||||
* goog.math.Integer.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setJstype($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\JSType::class);
|
||||
$this->jstype = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should this field be parsed lazily? Lazy applies only to message-type
|
||||
* fields. It means that when the outer message is initially parsed, the
|
||||
* inner message's contents will not be parsed but instead stored in encoded
|
||||
* form. The inner message will actually be parsed when it is first accessed.
|
||||
* This is only a hint. Implementations are free to choose whether to use
|
||||
* eager or lazy parsing regardless of the value of this option. However,
|
||||
* setting this option true suggests that the protocol author believes that
|
||||
* using lazy parsing on this field is worth the additional bookkeeping
|
||||
* overhead typically needed to implement it.
|
||||
* This option does not affect the public interface of any generated code;
|
||||
* all method signatures remain the same. Furthermore, thread-safety of the
|
||||
* interface is not affected by this option; const methods remain safe to
|
||||
* call from multiple threads concurrently, while non-const methods continue
|
||||
* to require exclusive access.
|
||||
* Note that lazy message fields are still eagerly verified to check
|
||||
* ill-formed wireformat or missing required fields. Calling IsInitialized()
|
||||
* on the outer message would fail if the inner message has missing required
|
||||
* fields. Failed verification would result in parsing failure (except when
|
||||
* uninitialized messages are acceptable).
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getLazy()
|
||||
{
|
||||
return isset($this->lazy) ? $this->lazy : false;
|
||||
}
|
||||
|
||||
public function hasLazy()
|
||||
{
|
||||
return isset($this->lazy);
|
||||
}
|
||||
|
||||
public function clearLazy()
|
||||
{
|
||||
unset($this->lazy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should this field be parsed lazily? Lazy applies only to message-type
|
||||
* fields. It means that when the outer message is initially parsed, the
|
||||
* inner message's contents will not be parsed but instead stored in encoded
|
||||
* form. The inner message will actually be parsed when it is first accessed.
|
||||
* This is only a hint. Implementations are free to choose whether to use
|
||||
* eager or lazy parsing regardless of the value of this option. However,
|
||||
* setting this option true suggests that the protocol author believes that
|
||||
* using lazy parsing on this field is worth the additional bookkeeping
|
||||
* overhead typically needed to implement it.
|
||||
* This option does not affect the public interface of any generated code;
|
||||
* all method signatures remain the same. Furthermore, thread-safety of the
|
||||
* interface is not affected by this option; const methods remain safe to
|
||||
* call from multiple threads concurrently, while non-const methods continue
|
||||
* to require exclusive access.
|
||||
* Note that lazy message fields are still eagerly verified to check
|
||||
* ill-formed wireformat or missing required fields. Calling IsInitialized()
|
||||
* on the outer message would fail if the inner message has missing required
|
||||
* fields. Failed verification would result in parsing failure (except when
|
||||
* uninitialized messages are acceptable).
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setLazy($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->lazy = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* unverified_lazy does no correctness checks on the byte stream. This should
|
||||
* only be used where lazy with verification is prohibitive for performance
|
||||
* reasons.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool unverified_lazy = 15 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getUnverifiedLazy()
|
||||
{
|
||||
return isset($this->unverified_lazy) ? $this->unverified_lazy : false;
|
||||
}
|
||||
|
||||
public function hasUnverifiedLazy()
|
||||
{
|
||||
return isset($this->unverified_lazy);
|
||||
}
|
||||
|
||||
public function clearUnverifiedLazy()
|
||||
{
|
||||
unset($this->unverified_lazy);
|
||||
}
|
||||
|
||||
/**
|
||||
* unverified_lazy does no correctness checks on the byte stream. This should
|
||||
* only be used where lazy with verification is prohibitive for performance
|
||||
* reasons.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool unverified_lazy = 15 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUnverifiedLazy($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->unverified_lazy = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this field deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for accessors, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating fields.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getDeprecated()
|
||||
{
|
||||
return isset($this->deprecated) ? $this->deprecated : false;
|
||||
}
|
||||
|
||||
public function hasDeprecated()
|
||||
{
|
||||
return isset($this->deprecated);
|
||||
}
|
||||
|
||||
public function clearDeprecated()
|
||||
{
|
||||
unset($this->deprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this field deprecated?
|
||||
* Depending on the target platform, this can emit Deprecated annotations
|
||||
* for accessors, or it will be completely ignored; in the very least, this
|
||||
* is a formalization for deprecating fields.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeprecated($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->deprecated = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. DO NOT USE!
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool weak = 10 [default = false, deprecated = true];</code>
|
||||
* @return bool
|
||||
* @deprecated
|
||||
*/
|
||||
public function getWeak()
|
||||
{
|
||||
if (isset($this->weak)) {
|
||||
@trigger_error('weak is deprecated.', E_USER_DEPRECATED);
|
||||
}
|
||||
return isset($this->weak) ? $this->weak : false;
|
||||
}
|
||||
|
||||
public function hasWeak()
|
||||
{
|
||||
if (isset($this->weak)) {
|
||||
@trigger_error('weak is deprecated.', E_USER_DEPRECATED);
|
||||
}
|
||||
return isset($this->weak);
|
||||
}
|
||||
|
||||
public function clearWeak()
|
||||
{
|
||||
@trigger_error('weak is deprecated.', E_USER_DEPRECATED);
|
||||
unset($this->weak);
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. DO NOT USE!
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool weak = 10 [default = false, deprecated = true];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
* @deprecated
|
||||
*/
|
||||
public function setWeak($var)
|
||||
{
|
||||
@trigger_error('weak is deprecated.', E_USER_DEPRECATED);
|
||||
GPBUtil::checkBool($var);
|
||||
$this->weak = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the field value should not be printed out when using debug
|
||||
* formats, e.g. when the field contains sensitive credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code>
|
||||
* @return bool
|
||||
*/
|
||||
public function getDebugRedact()
|
||||
{
|
||||
return isset($this->debug_redact) ? $this->debug_redact : false;
|
||||
}
|
||||
|
||||
public function hasDebugRedact()
|
||||
{
|
||||
return isset($this->debug_redact);
|
||||
}
|
||||
|
||||
public function clearDebugRedact()
|
||||
{
|
||||
unset($this->debug_redact);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the field value should not be printed out when using debug
|
||||
* formats, e.g. when the field contains sensitive credentials.
|
||||
*
|
||||
* Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code>
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebugRedact($var)
|
||||
{
|
||||
GPBUtil::checkBool($var);
|
||||
$this->debug_redact = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getRetention()
|
||||
{
|
||||
return isset($this->retention) ? $this->retention : 0;
|
||||
}
|
||||
|
||||
public function hasRetention()
|
||||
{
|
||||
return isset($this->retention);
|
||||
}
|
||||
|
||||
public function clearRetention()
|
||||
{
|
||||
unset($this->retention);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetention($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\OptionRetention::class);
|
||||
$this->retention = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code>
|
||||
* @return RepeatedField<int>
|
||||
*/
|
||||
public function getTargets()
|
||||
{
|
||||
return $this->targets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code>
|
||||
* @param int[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setTargets($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Protobuf\Internal\FieldOptions\OptionTargetType::class);
|
||||
$this->targets = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FieldOptions\EditionDefault>
|
||||
*/
|
||||
public function getEditionDefaults()
|
||||
{
|
||||
return $this->edition_defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldOptions\EditionDefault[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEditionDefaults($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldOptions\EditionDefault::class);
|
||||
$this->edition_defaults = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code>
|
||||
* @return \Google\Protobuf\Internal\FeatureSet|null
|
||||
*/
|
||||
public function getFeatures()
|
||||
{
|
||||
return $this->features;
|
||||
}
|
||||
|
||||
public function hasFeatures()
|
||||
{
|
||||
return isset($this->features);
|
||||
}
|
||||
|
||||
public function clearFeatures()
|
||||
{
|
||||
unset($this->features);
|
||||
}
|
||||
|
||||
/**
|
||||
* Any features defined in the specific edition.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code>
|
||||
* @param \Google\Protobuf\Internal\FeatureSet $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatures($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class);
|
||||
$this->features = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code>
|
||||
* @return \Google\Protobuf\Internal\FieldOptions\FeatureSupport|null
|
||||
*/
|
||||
public function getFeatureSupport()
|
||||
{
|
||||
return $this->feature_support;
|
||||
}
|
||||
|
||||
public function hasFeatureSupport()
|
||||
{
|
||||
return isset($this->feature_support);
|
||||
}
|
||||
|
||||
public function clearFeatureSupport()
|
||||
{
|
||||
unset($this->feature_support);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldOptions\FeatureSupport $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFeatureSupport($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class);
|
||||
$this->feature_support = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption>
|
||||
*/
|
||||
public function getUninterpretedOption()
|
||||
{
|
||||
return $this->uninterpreted_option;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parser stores options it doesn't recognize here. See above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
|
||||
* @param \Google\Protobuf\Internal\UninterpretedOption[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setUninterpretedOption($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
|
||||
$this->uninterpreted_option = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
63
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
vendored
Normal file
63
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FieldOptions.CType</code>
|
||||
*/
|
||||
class CType
|
||||
{
|
||||
/**
|
||||
* Default mode.
|
||||
*
|
||||
* Generated from protobuf enum <code>STRING = 0;</code>
|
||||
*/
|
||||
const STRING = 0;
|
||||
/**
|
||||
* The option [ctype=CORD] may be applied to a non-repeated field of type
|
||||
* "bytes". It indicates that in C++, the data should be stored in a Cord
|
||||
* instead of a string. For very large strings, this may reduce memory
|
||||
* fragmentation. It may also allow better performance when parsing from a
|
||||
* Cord, or when parsing with aliasing enabled, as the parsed Cord may then
|
||||
* alias the original buffer.
|
||||
*
|
||||
* Generated from protobuf enum <code>CORD = 1;</code>
|
||||
*/
|
||||
const CORD = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>STRING_PIECE = 2;</code>
|
||||
*/
|
||||
const STRING_PIECE = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::STRING => 'STRING',
|
||||
self::CORD => 'CORD',
|
||||
self::STRING_PIECE => 'STRING_PIECE',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
115
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php
vendored
Normal file
115
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.FieldOptions.EditionDefault</code>
|
||||
*/
|
||||
class EditionDefault extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
*/
|
||||
protected $edition = null;
|
||||
/**
|
||||
* Textproto value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string value = 2;</code>
|
||||
*/
|
||||
protected $value = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $edition
|
||||
* @type string $value
|
||||
* Textproto value.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEdition()
|
||||
{
|
||||
return isset($this->edition) ? $this->edition : 0;
|
||||
}
|
||||
|
||||
public function hasEdition()
|
||||
{
|
||||
return isset($this->edition);
|
||||
}
|
||||
|
||||
public function clearEdition()
|
||||
{
|
||||
unset($this->edition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 3;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEdition($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Textproto value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string value = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return isset($this->value) ? $this->value : '';
|
||||
}
|
||||
|
||||
public function hasValue()
|
||||
{
|
||||
return isset($this->value);
|
||||
}
|
||||
|
||||
public function clearValue()
|
||||
{
|
||||
unset($this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Textproto value.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string value = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->value = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
236
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php
vendored
Normal file
236
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Information about the support window of a feature.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FieldOptions.FeatureSupport</code>
|
||||
*/
|
||||
class FeatureSupport extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* The edition that this feature was first available in. In editions
|
||||
* earlier than this one, the default assigned to EDITION_LEGACY will be
|
||||
* used, and proto files will not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_introduced = 1;</code>
|
||||
*/
|
||||
protected $edition_introduced = null;
|
||||
/**
|
||||
* The edition this feature becomes deprecated in. Using this after this
|
||||
* edition may trigger warnings.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_deprecated = 2;</code>
|
||||
*/
|
||||
protected $edition_deprecated = null;
|
||||
/**
|
||||
* The deprecation warning text if this feature is used after the edition it
|
||||
* was marked deprecated in.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string deprecation_warning = 3;</code>
|
||||
*/
|
||||
protected $deprecation_warning = null;
|
||||
/**
|
||||
* The edition this feature is no longer available in. In editions after
|
||||
* this one, the last default assigned will be used, and proto files will
|
||||
* not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_removed = 4;</code>
|
||||
*/
|
||||
protected $edition_removed = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int $edition_introduced
|
||||
* The edition that this feature was first available in. In editions
|
||||
* earlier than this one, the default assigned to EDITION_LEGACY will be
|
||||
* used, and proto files will not be able to override it.
|
||||
* @type int $edition_deprecated
|
||||
* The edition this feature becomes deprecated in. Using this after this
|
||||
* edition may trigger warnings.
|
||||
* @type string $deprecation_warning
|
||||
* The deprecation warning text if this feature is used after the edition it
|
||||
* was marked deprecated in.
|
||||
* @type int $edition_removed
|
||||
* The edition this feature is no longer available in. In editions after
|
||||
* this one, the last default assigned will be used, and proto files will
|
||||
* not be able to override it.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition that this feature was first available in. In editions
|
||||
* earlier than this one, the default assigned to EDITION_LEGACY will be
|
||||
* used, and proto files will not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_introduced = 1;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEditionIntroduced()
|
||||
{
|
||||
return isset($this->edition_introduced) ? $this->edition_introduced : 0;
|
||||
}
|
||||
|
||||
public function hasEditionIntroduced()
|
||||
{
|
||||
return isset($this->edition_introduced);
|
||||
}
|
||||
|
||||
public function clearEditionIntroduced()
|
||||
{
|
||||
unset($this->edition_introduced);
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition that this feature was first available in. In editions
|
||||
* earlier than this one, the default assigned to EDITION_LEGACY will be
|
||||
* used, and proto files will not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_introduced = 1;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEditionIntroduced($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition_introduced = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition this feature becomes deprecated in. Using this after this
|
||||
* edition may trigger warnings.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_deprecated = 2;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEditionDeprecated()
|
||||
{
|
||||
return isset($this->edition_deprecated) ? $this->edition_deprecated : 0;
|
||||
}
|
||||
|
||||
public function hasEditionDeprecated()
|
||||
{
|
||||
return isset($this->edition_deprecated);
|
||||
}
|
||||
|
||||
public function clearEditionDeprecated()
|
||||
{
|
||||
unset($this->edition_deprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition this feature becomes deprecated in. Using this after this
|
||||
* edition may trigger warnings.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_deprecated = 2;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEditionDeprecated($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition_deprecated = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The deprecation warning text if this feature is used after the edition it
|
||||
* was marked deprecated in.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string deprecation_warning = 3;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getDeprecationWarning()
|
||||
{
|
||||
return isset($this->deprecation_warning) ? $this->deprecation_warning : '';
|
||||
}
|
||||
|
||||
public function hasDeprecationWarning()
|
||||
{
|
||||
return isset($this->deprecation_warning);
|
||||
}
|
||||
|
||||
public function clearDeprecationWarning()
|
||||
{
|
||||
unset($this->deprecation_warning);
|
||||
}
|
||||
|
||||
/**
|
||||
* The deprecation warning text if this feature is used after the edition it
|
||||
* was marked deprecated in.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string deprecation_warning = 3;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeprecationWarning($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->deprecation_warning = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition this feature is no longer available in. In editions after
|
||||
* this one, the last default assigned will be used, and proto files will
|
||||
* not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_removed = 4;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEditionRemoved()
|
||||
{
|
||||
return isset($this->edition_removed) ? $this->edition_removed : 0;
|
||||
}
|
||||
|
||||
public function hasEditionRemoved()
|
||||
{
|
||||
return isset($this->edition_removed);
|
||||
}
|
||||
|
||||
public function clearEditionRemoved()
|
||||
{
|
||||
unset($this->edition_removed);
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition this feature is no longer available in. In editions after
|
||||
* this one, the last default assigned will be used, and proto files will
|
||||
* not be able to override it.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition_removed = 4;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEditionRemoved($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition_removed = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
60
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
vendored
Normal file
60
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Protobuf type <code>google.protobuf.FieldOptions.JSType</code>
|
||||
*/
|
||||
class JSType
|
||||
{
|
||||
/**
|
||||
* Use the default type.
|
||||
*
|
||||
* Generated from protobuf enum <code>JS_NORMAL = 0;</code>
|
||||
*/
|
||||
const JS_NORMAL = 0;
|
||||
/**
|
||||
* Use JavaScript strings.
|
||||
*
|
||||
* Generated from protobuf enum <code>JS_STRING = 1;</code>
|
||||
*/
|
||||
const JS_STRING = 1;
|
||||
/**
|
||||
* Use JavaScript numbers.
|
||||
*
|
||||
* Generated from protobuf enum <code>JS_NUMBER = 2;</code>
|
||||
*/
|
||||
const JS_NUMBER = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::JS_NORMAL => 'JS_NORMAL',
|
||||
self::JS_STRING => 'JS_STRING',
|
||||
self::JS_NUMBER => 'JS_NUMBER',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
56
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/OptionRetention.php
vendored
Normal file
56
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/OptionRetention.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* If set to RETENTION_SOURCE, the option will be omitted from the binary.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.FieldOptions.OptionRetention</code>
|
||||
*/
|
||||
class OptionRetention
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>RETENTION_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const RETENTION_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>RETENTION_RUNTIME = 1;</code>
|
||||
*/
|
||||
const RETENTION_RUNTIME = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>RETENTION_SOURCE = 2;</code>
|
||||
*/
|
||||
const RETENTION_SOURCE = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::RETENTION_UNKNOWN => 'RETENTION_UNKNOWN',
|
||||
self::RETENTION_RUNTIME => 'RETENTION_RUNTIME',
|
||||
self::RETENTION_SOURCE => 'RETENTION_SOURCE',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
93
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/OptionTargetType.php
vendored
Normal file
93
vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/OptionTargetType.php
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FieldOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* This indicates the types of entities that the field may apply to when used
|
||||
* as an option. If it is unset, then the field may be freely used as an
|
||||
* option on any kind of entity.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.FieldOptions.OptionTargetType</code>
|
||||
*/
|
||||
class OptionTargetType
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_UNKNOWN = 0;</code>
|
||||
*/
|
||||
const TARGET_TYPE_UNKNOWN = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_FILE = 1;</code>
|
||||
*/
|
||||
const TARGET_TYPE_FILE = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_EXTENSION_RANGE = 2;</code>
|
||||
*/
|
||||
const TARGET_TYPE_EXTENSION_RANGE = 2;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_MESSAGE = 3;</code>
|
||||
*/
|
||||
const TARGET_TYPE_MESSAGE = 3;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_FIELD = 4;</code>
|
||||
*/
|
||||
const TARGET_TYPE_FIELD = 4;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_ONEOF = 5;</code>
|
||||
*/
|
||||
const TARGET_TYPE_ONEOF = 5;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_ENUM = 6;</code>
|
||||
*/
|
||||
const TARGET_TYPE_ENUM = 6;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_ENUM_ENTRY = 7;</code>
|
||||
*/
|
||||
const TARGET_TYPE_ENUM_ENTRY = 7;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_SERVICE = 8;</code>
|
||||
*/
|
||||
const TARGET_TYPE_SERVICE = 8;
|
||||
/**
|
||||
* Generated from protobuf enum <code>TARGET_TYPE_METHOD = 9;</code>
|
||||
*/
|
||||
const TARGET_TYPE_METHOD = 9;
|
||||
|
||||
private static $valueToName = [
|
||||
self::TARGET_TYPE_UNKNOWN => 'TARGET_TYPE_UNKNOWN',
|
||||
self::TARGET_TYPE_FILE => 'TARGET_TYPE_FILE',
|
||||
self::TARGET_TYPE_EXTENSION_RANGE => 'TARGET_TYPE_EXTENSION_RANGE',
|
||||
self::TARGET_TYPE_MESSAGE => 'TARGET_TYPE_MESSAGE',
|
||||
self::TARGET_TYPE_FIELD => 'TARGET_TYPE_FIELD',
|
||||
self::TARGET_TYPE_ONEOF => 'TARGET_TYPE_ONEOF',
|
||||
self::TARGET_TYPE_ENUM => 'TARGET_TYPE_ENUM',
|
||||
self::TARGET_TYPE_ENUM_ENTRY => 'TARGET_TYPE_ENUM_ENTRY',
|
||||
self::TARGET_TYPE_SERVICE => 'TARGET_TYPE_SERVICE',
|
||||
self::TARGET_TYPE_METHOD => 'TARGET_TYPE_METHOD',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
66
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php
vendored
Normal file
66
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class FileDescriptor
|
||||
{
|
||||
|
||||
private $package;
|
||||
private $message_type = [];
|
||||
private $enum_type = [];
|
||||
|
||||
public function setPackage($package)
|
||||
{
|
||||
$this->package = $package;
|
||||
}
|
||||
|
||||
public function getPackage()
|
||||
{
|
||||
return $this->package;
|
||||
}
|
||||
|
||||
public function getMessageType()
|
||||
{
|
||||
return $this->message_type;
|
||||
}
|
||||
|
||||
public function addMessageType($desc)
|
||||
{
|
||||
$this->message_type[] = $desc;
|
||||
}
|
||||
|
||||
public function getEnumType()
|
||||
{
|
||||
return $this->enum_type;
|
||||
}
|
||||
|
||||
public function addEnumType($desc)
|
||||
{
|
||||
$this->enum_type[]= $desc;
|
||||
}
|
||||
|
||||
public static function buildFromProto($proto)
|
||||
{
|
||||
$file = new FileDescriptor();
|
||||
$file->setPackage($proto->getPackage());
|
||||
foreach ($proto->getMessageType() as $message_proto) {
|
||||
$file->addMessageType(Descriptor::buildFromProto(
|
||||
$message_proto, $proto, ""));
|
||||
}
|
||||
foreach ($proto->getEnumType() as $enum_proto) {
|
||||
$file->addEnumType(
|
||||
EnumDescriptor::buildFromProto(
|
||||
$enum_proto,
|
||||
$proto,
|
||||
""));
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
596
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
vendored
Normal file
596
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
vendored
Normal file
@@ -0,0 +1,596 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes a complete .proto file.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
|
||||
*/
|
||||
class FileDescriptorProto extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* file name, relative to root of source tree
|
||||
*
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
*/
|
||||
protected $name = null;
|
||||
/**
|
||||
* e.g. "foo", "foo.bar", etc.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string package = 2;</code>
|
||||
*/
|
||||
protected $package = null;
|
||||
/**
|
||||
* Names of files imported by this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string dependency = 3;</code>
|
||||
*/
|
||||
private $dependency;
|
||||
/**
|
||||
* Indexes of the public imported files in the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
|
||||
*/
|
||||
private $public_dependency;
|
||||
/**
|
||||
* Indexes of the weak imported files in the dependency list.
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
|
||||
*/
|
||||
private $weak_dependency;
|
||||
/**
|
||||
* Names of files imported by this file purely for the purpose of providing
|
||||
* option extensions. These are excluded from the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string option_dependency = 15;</code>
|
||||
*/
|
||||
private $option_dependency;
|
||||
/**
|
||||
* All top-level definitions in this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
|
||||
*/
|
||||
private $message_type;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
|
||||
*/
|
||||
private $enum_type;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
|
||||
*/
|
||||
private $service;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
|
||||
*/
|
||||
private $extension;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
|
||||
*/
|
||||
protected $options = null;
|
||||
/**
|
||||
* This field contains optional information about the original source code.
|
||||
* You may safely remove this entire field without harming runtime
|
||||
* functionality of the descriptors -- the information is needed only by
|
||||
* development tools.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
|
||||
*/
|
||||
protected $source_code_info = null;
|
||||
/**
|
||||
* The syntax of the proto file.
|
||||
* The supported values are "proto2", "proto3", and "editions".
|
||||
* If `edition` is present, this value must be "editions".
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string syntax = 12;</code>
|
||||
*/
|
||||
protected $syntax = null;
|
||||
/**
|
||||
* The edition of the proto file.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code>
|
||||
*/
|
||||
protected $edition = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* file name, relative to root of source tree
|
||||
* @type string $package
|
||||
* e.g. "foo", "foo.bar", etc.
|
||||
* @type string[] $dependency
|
||||
* Names of files imported by this file.
|
||||
* @type int[] $public_dependency
|
||||
* Indexes of the public imported files in the dependency list above.
|
||||
* @type int[] $weak_dependency
|
||||
* Indexes of the weak imported files in the dependency list.
|
||||
* For Google-internal migration only. Do not use.
|
||||
* @type string[] $option_dependency
|
||||
* Names of files imported by this file purely for the purpose of providing
|
||||
* option extensions. These are excluded from the dependency list above.
|
||||
* @type \Google\Protobuf\Internal\DescriptorProto[] $message_type
|
||||
* All top-level definitions in this file.
|
||||
* @type \Google\Protobuf\Internal\EnumDescriptorProto[] $enum_type
|
||||
* @type \Google\Protobuf\Internal\ServiceDescriptorProto[] $service
|
||||
* @type \Google\Protobuf\Internal\FieldDescriptorProto[] $extension
|
||||
* @type \Google\Protobuf\Internal\FileOptions $options
|
||||
* @type \Google\Protobuf\Internal\SourceCodeInfo $source_code_info
|
||||
* This field contains optional information about the original source code.
|
||||
* You may safely remove this entire field without harming runtime
|
||||
* functionality of the descriptors -- the information is needed only by
|
||||
* development tools.
|
||||
* @type string $syntax
|
||||
* The syntax of the proto file.
|
||||
* The supported values are "proto2", "proto3", and "editions".
|
||||
* If `edition` is present, this value must be "editions".
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
* @type int $edition
|
||||
* The edition of the proto file.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* file name, relative to root of source tree
|
||||
*
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->name) ? $this->name : '';
|
||||
}
|
||||
|
||||
public function hasName()
|
||||
{
|
||||
return isset($this->name);
|
||||
}
|
||||
|
||||
public function clearName()
|
||||
{
|
||||
unset($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* file name, relative to root of source tree
|
||||
*
|
||||
* Generated from protobuf field <code>optional string name = 1;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->name = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* e.g. "foo", "foo.bar", etc.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string package = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getPackage()
|
||||
{
|
||||
return isset($this->package) ? $this->package : '';
|
||||
}
|
||||
|
||||
public function hasPackage()
|
||||
{
|
||||
return isset($this->package);
|
||||
}
|
||||
|
||||
public function clearPackage()
|
||||
{
|
||||
unset($this->package);
|
||||
}
|
||||
|
||||
/**
|
||||
* e.g. "foo", "foo.bar", etc.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string package = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPackage($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->package = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Names of files imported by this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string dependency = 3;</code>
|
||||
* @return RepeatedField<string>
|
||||
*/
|
||||
public function getDependency()
|
||||
{
|
||||
return $this->dependency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Names of files imported by this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string dependency = 3;</code>
|
||||
* @param string[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setDependency($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
|
||||
$this->dependency = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indexes of the public imported files in the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
|
||||
* @return RepeatedField<int>
|
||||
*/
|
||||
public function getPublicDependency()
|
||||
{
|
||||
return $this->public_dependency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indexes of the public imported files in the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
|
||||
* @param int[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPublicDependency($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
|
||||
$this->public_dependency = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indexes of the weak imported files in the dependency list.
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
|
||||
* @return RepeatedField<int>
|
||||
*/
|
||||
public function getWeakDependency()
|
||||
{
|
||||
return $this->weak_dependency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indexes of the weak imported files in the dependency list.
|
||||
* For Google-internal migration only. Do not use.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
|
||||
* @param int[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setWeakDependency($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
|
||||
$this->weak_dependency = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Names of files imported by this file purely for the purpose of providing
|
||||
* option extensions. These are excluded from the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string option_dependency = 15;</code>
|
||||
* @return RepeatedField<string>
|
||||
*/
|
||||
public function getOptionDependency()
|
||||
{
|
||||
return $this->option_dependency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Names of files imported by this file purely for the purpose of providing
|
||||
* option extensions. These are excluded from the dependency list above.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated string option_dependency = 15;</code>
|
||||
* @param string[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptionDependency($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
|
||||
$this->option_dependency = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* All top-level definitions in this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto>
|
||||
*/
|
||||
public function getMessageType()
|
||||
{
|
||||
return $this->message_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* All top-level definitions in this file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
|
||||
* @param \Google\Protobuf\Internal\DescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessageType($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
|
||||
$this->message_type = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto>
|
||||
*/
|
||||
public function getEnumType()
|
||||
{
|
||||
return $this->enum_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
|
||||
* @param \Google\Protobuf\Internal\EnumDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnumType($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
|
||||
$this->enum_type = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\ServiceDescriptorProto>
|
||||
*/
|
||||
public function getService()
|
||||
{
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
|
||||
* @param \Google\Protobuf\Internal\ServiceDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setService($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
|
||||
$this->service = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto>
|
||||
*/
|
||||
public function getExtension()
|
||||
{
|
||||
return $this->extension;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
|
||||
* @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtension($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
|
||||
$this->extension = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
|
||||
* @return \Google\Protobuf\Internal\FileOptions|null
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function hasOptions()
|
||||
{
|
||||
return isset($this->options);
|
||||
}
|
||||
|
||||
public function clearOptions()
|
||||
{
|
||||
unset($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
|
||||
* @param \Google\Protobuf\Internal\FileOptions $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOptions($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
|
||||
$this->options = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This field contains optional information about the original source code.
|
||||
* You may safely remove this entire field without harming runtime
|
||||
* functionality of the descriptors -- the information is needed only by
|
||||
* development tools.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
|
||||
* @return \Google\Protobuf\Internal\SourceCodeInfo|null
|
||||
*/
|
||||
public function getSourceCodeInfo()
|
||||
{
|
||||
return $this->source_code_info;
|
||||
}
|
||||
|
||||
public function hasSourceCodeInfo()
|
||||
{
|
||||
return isset($this->source_code_info);
|
||||
}
|
||||
|
||||
public function clearSourceCodeInfo()
|
||||
{
|
||||
unset($this->source_code_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* This field contains optional information about the original source code.
|
||||
* You may safely remove this entire field without harming runtime
|
||||
* functionality of the descriptors -- the information is needed only by
|
||||
* development tools.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
|
||||
* @param \Google\Protobuf\Internal\SourceCodeInfo $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSourceCodeInfo($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
|
||||
$this->source_code_info = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The syntax of the proto file.
|
||||
* The supported values are "proto2", "proto3", and "editions".
|
||||
* If `edition` is present, this value must be "editions".
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string syntax = 12;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getSyntax()
|
||||
{
|
||||
return isset($this->syntax) ? $this->syntax : '';
|
||||
}
|
||||
|
||||
public function hasSyntax()
|
||||
{
|
||||
return isset($this->syntax);
|
||||
}
|
||||
|
||||
public function clearSyntax()
|
||||
{
|
||||
unset($this->syntax);
|
||||
}
|
||||
|
||||
/**
|
||||
* The syntax of the proto file.
|
||||
* The supported values are "proto2", "proto3", and "editions".
|
||||
* If `edition` is present, this value must be "editions".
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string syntax = 12;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSyntax($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->syntax = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition of the proto file.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEdition()
|
||||
{
|
||||
return isset($this->edition) ? $this->edition : 0;
|
||||
}
|
||||
|
||||
public function hasEdition()
|
||||
{
|
||||
return isset($this->edition);
|
||||
}
|
||||
|
||||
public function clearEdition()
|
||||
{
|
||||
unset($this->edition);
|
||||
}
|
||||
|
||||
/**
|
||||
* The edition of the proto file.
|
||||
* WARNING: This field should only be used by protobuf plugins or special
|
||||
* cases like the proto compiler. Other uses are discouraged and
|
||||
* developers should rely on the protoreflect APIs for their client language.
|
||||
*
|
||||
* Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEdition($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class);
|
||||
$this->edition = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
64
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
vendored
Normal file
64
vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* The protocol compiler can output a FileDescriptorSet containing the .proto
|
||||
* files it parses.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
|
||||
*/
|
||||
class FileDescriptorSet extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
|
||||
*/
|
||||
private $file;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Google\Protobuf\Internal\FileDescriptorProto[] $file
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\FileDescriptorProto>
|
||||
*/
|
||||
public function getFile()
|
||||
{
|
||||
return $this->file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
|
||||
* @param \Google\Protobuf\Internal\FileDescriptorProto[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setFile($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
|
||||
$this->file = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1138
vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
vendored
Normal file
1138
vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
62
vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
vendored
Normal file
62
vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\FileOptions;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Generated classes can be optimized for speed or code size.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.FileOptions.OptimizeMode</code>
|
||||
*/
|
||||
class OptimizeMode
|
||||
{
|
||||
/**
|
||||
* Generate complete code for parsing, serialization,
|
||||
*
|
||||
* Generated from protobuf enum <code>SPEED = 1;</code>
|
||||
*/
|
||||
const SPEED = 1;
|
||||
/**
|
||||
* etc.
|
||||
*
|
||||
* Generated from protobuf enum <code>CODE_SIZE = 2;</code>
|
||||
*/
|
||||
const CODE_SIZE = 2;
|
||||
/**
|
||||
* Generate code using MessageLite and the lite runtime.
|
||||
*
|
||||
* Generated from protobuf enum <code>LITE_RUNTIME = 3;</code>
|
||||
*/
|
||||
const LITE_RUNTIME = 3;
|
||||
|
||||
private static $valueToName = [
|
||||
self::SPEED => 'SPEED',
|
||||
self::CODE_SIZE => 'CODE_SIZE',
|
||||
self::LITE_RUNTIME => 'LITE_RUNTIME',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
24
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
vendored
Normal file
24
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class GPBDecodeException extends \Exception
|
||||
{
|
||||
public function __construct(
|
||||
$message,
|
||||
$code = 0,
|
||||
?\Exception $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
"Error occurred during parsing: " . $message,
|
||||
$code,
|
||||
$previous);
|
||||
}
|
||||
}
|
||||
291
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php
vendored
Normal file
291
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php
vendored
Normal file
@@ -0,0 +1,291 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\PrintOptions;
|
||||
|
||||
class GPBJsonWire
|
||||
{
|
||||
|
||||
public static function serializeFieldToStream(
|
||||
$value,
|
||||
$field,
|
||||
&$output, $has_field_name = true)
|
||||
{
|
||||
if ($has_field_name) {
|
||||
$output->writeRaw("\"", 1);
|
||||
$field_name = GPBJsonWire::formatFieldName($field, $output->getOptions());
|
||||
$output->writeRaw($field_name, strlen($field_name));
|
||||
$output->writeRaw("\":", 2);
|
||||
}
|
||||
return static::serializeFieldValueToStream(
|
||||
$value,
|
||||
$field,
|
||||
$output,
|
||||
!$has_field_name);
|
||||
}
|
||||
|
||||
public static function serializeFieldValueToStream(
|
||||
$values,
|
||||
$field,
|
||||
&$output,
|
||||
$is_well_known = false)
|
||||
{
|
||||
if ($field->isMap()) {
|
||||
$output->writeRaw("{", 1);
|
||||
$first = true;
|
||||
$map_entry = $field->getMessageType();
|
||||
$key_field = $map_entry->getFieldByNumber(1);
|
||||
$value_field = $map_entry->getFieldByNumber(2);
|
||||
|
||||
switch ($key_field->getType()) {
|
||||
case GPBType::STRING:
|
||||
case GPBType::SFIXED64:
|
||||
case GPBType::INT64:
|
||||
case GPBType::SINT64:
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::UINT64:
|
||||
$additional_quote = false;
|
||||
break;
|
||||
default:
|
||||
$additional_quote = true;
|
||||
}
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
if ($first) {
|
||||
$first = false;
|
||||
} else {
|
||||
$output->writeRaw(",", 1);
|
||||
}
|
||||
if ($additional_quote) {
|
||||
$output->writeRaw("\"", 1);
|
||||
}
|
||||
if (!static::serializeSingularFieldValueToStream(
|
||||
$key,
|
||||
$key_field,
|
||||
$output,
|
||||
$is_well_known)) {
|
||||
return false;
|
||||
}
|
||||
if ($additional_quote) {
|
||||
$output->writeRaw("\"", 1);
|
||||
}
|
||||
$output->writeRaw(":", 1);
|
||||
if (!static::serializeSingularFieldValueToStream(
|
||||
$value,
|
||||
$value_field,
|
||||
$output,
|
||||
$is_well_known)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$output->writeRaw("}", 1);
|
||||
return true;
|
||||
} elseif ($field->isRepeated()) {
|
||||
$output->writeRaw("[", 1);
|
||||
$first = true;
|
||||
foreach ($values as $value) {
|
||||
if ($first) {
|
||||
$first = false;
|
||||
} else {
|
||||
$output->writeRaw(",", 1);
|
||||
}
|
||||
if (!static::serializeSingularFieldValueToStream(
|
||||
$value,
|
||||
$field,
|
||||
$output,
|
||||
$is_well_known)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$output->writeRaw("]", 1);
|
||||
return true;
|
||||
} else {
|
||||
return static::serializeSingularFieldValueToStream(
|
||||
$values,
|
||||
$field,
|
||||
$output,
|
||||
$is_well_known);
|
||||
}
|
||||
}
|
||||
|
||||
private static function serializeSingularFieldValueToStream(
|
||||
$value,
|
||||
$field,
|
||||
&$output, $is_well_known = false)
|
||||
{
|
||||
switch ($field->getType()) {
|
||||
case GPBType::SFIXED32:
|
||||
case GPBType::SINT32:
|
||||
case GPBType::INT32:
|
||||
$str_value = strval($value);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
break;
|
||||
case GPBType::FIXED32:
|
||||
case GPBType::UINT32:
|
||||
if ($value < 0) {
|
||||
$value = bcadd($value, "4294967296");
|
||||
}
|
||||
$str_value = strval($value);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
break;
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::UINT64:
|
||||
if ($value < 0) {
|
||||
$value = bcadd($value, "18446744073709551616");
|
||||
}
|
||||
// Intentional fall through.
|
||||
case GPBType::SFIXED64:
|
||||
case GPBType::INT64:
|
||||
case GPBType::SINT64:
|
||||
$output->writeRaw("\"", 1);
|
||||
$str_value = strval($value);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
$output->writeRaw("\"", 1);
|
||||
break;
|
||||
case GPBType::FLOAT:
|
||||
if (is_nan($value)) {
|
||||
$str_value = "\"NaN\"";
|
||||
} elseif ($value === INF) {
|
||||
$str_value = "\"Infinity\"";
|
||||
} elseif ($value === -INF) {
|
||||
$str_value = "\"-Infinity\"";
|
||||
} else {
|
||||
$str_value = sprintf("%.8g", $value);
|
||||
}
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
break;
|
||||
case GPBType::DOUBLE:
|
||||
if (is_nan($value)) {
|
||||
$str_value = "\"NaN\"";
|
||||
} elseif ($value === INF) {
|
||||
$str_value = "\"Infinity\"";
|
||||
} elseif ($value === -INF) {
|
||||
$str_value = "\"-Infinity\"";
|
||||
} else {
|
||||
$str_value = sprintf("%.17g", $value);
|
||||
}
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
break;
|
||||
case GPBType::ENUM:
|
||||
$enum_desc = $field->getEnumType();
|
||||
if ($enum_desc->getClass() === "Google\Protobuf\NullValue") {
|
||||
$output->writeRaw("null", 4);
|
||||
break;
|
||||
}
|
||||
if ($output->getOptions() & PrintOptions::ALWAYS_PRINT_ENUMS_AS_INTS) {
|
||||
$str_value = strval($value);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
break;
|
||||
}
|
||||
$enum_value_desc = $enum_desc->getValueByNumber($value);
|
||||
if (!is_null($enum_value_desc)) {
|
||||
$str_value = $enum_value_desc->getName();
|
||||
$output->writeRaw("\"", 1);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
$output->writeRaw("\"", 1);
|
||||
} else {
|
||||
$str_value = strval($value);
|
||||
$output->writeRaw($str_value, strlen($str_value));
|
||||
}
|
||||
break;
|
||||
case GPBType::BOOL:
|
||||
if ($value) {
|
||||
$output->writeRaw("true", 4);
|
||||
} else {
|
||||
$output->writeRaw("false", 5);
|
||||
}
|
||||
break;
|
||||
case GPBType::BYTES:
|
||||
$bytes_value = base64_encode($value);
|
||||
$output->writeRaw("\"", 1);
|
||||
$output->writeRaw($bytes_value, strlen($bytes_value));
|
||||
$output->writeRaw("\"", 1);
|
||||
break;
|
||||
case GPBType::STRING:
|
||||
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
|
||||
$output->writeRaw($value, strlen($value));
|
||||
break;
|
||||
// case GPBType::GROUP:
|
||||
// echo "GROUP\xA";
|
||||
// trigger_error("Not implemented.", E_ERROR);
|
||||
// break;
|
||||
case GPBType::MESSAGE:
|
||||
$value->serializeToJsonStream($output);
|
||||
break;
|
||||
default:
|
||||
user_error("Unsupported type.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static function formatFieldName($field, $options)
|
||||
{
|
||||
if ($options & PrintOptions::PRESERVE_PROTO_FIELD_NAMES) {
|
||||
return $field->getName();
|
||||
}
|
||||
return $field->getJsonName();
|
||||
}
|
||||
|
||||
// Used for escaping control chars in strings.
|
||||
private static $k_control_char_limit = 0x20;
|
||||
|
||||
private static function jsonNiceEscape($c)
|
||||
{
|
||||
switch ($c) {
|
||||
case '"': return "\\\"";
|
||||
case '\\': return "\\\\";
|
||||
case '/': return "\\/";
|
||||
case '\b': return "\\b";
|
||||
case '\f': return "\\f";
|
||||
case '\n': return "\\n";
|
||||
case '\r': return "\\r";
|
||||
case '\t': return "\\t";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
private static function isJsonEscaped($c)
|
||||
{
|
||||
// See RFC 4627.
|
||||
return $c < chr($k_control_char_limit) || $c === "\"" || $c === "\\";
|
||||
}
|
||||
|
||||
public static function escapedJson($value)
|
||||
{
|
||||
$escaped_value = "";
|
||||
$unescaped_run = "";
|
||||
for ($i = 0; $i < strlen($value); $i++) {
|
||||
$c = $value[$i];
|
||||
// Handle escaping.
|
||||
if (static::isJsonEscaped($c)) {
|
||||
// Use a "nice" escape, like \n, if one exists for this
|
||||
// character.
|
||||
$escape = static::jsonNiceEscape($c);
|
||||
if (is_null($escape)) {
|
||||
$escape = "\\u00" . bin2hex($c);
|
||||
}
|
||||
if ($unescaped_run !== "") {
|
||||
$escaped_value .= $unescaped_run;
|
||||
$unescaped_run = "";
|
||||
}
|
||||
$escaped_value .= $escape;
|
||||
} else {
|
||||
if ($unescaped_run === "") {
|
||||
$unescaped_run .= $c;
|
||||
}
|
||||
}
|
||||
}
|
||||
$escaped_value .= $unescaped_run;
|
||||
return $escaped_value;
|
||||
}
|
||||
|
||||
}
|
||||
17
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
vendored
Normal file
17
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class GPBLabel
|
||||
{
|
||||
const OPTIONAL = 1;
|
||||
const REQUIRED = 2;
|
||||
const REPEATED = 3;
|
||||
}
|
||||
32
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php
vendored
Normal file
32
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class GPBType
|
||||
{
|
||||
const DOUBLE = 1;
|
||||
const FLOAT = 2;
|
||||
const INT64 = 3;
|
||||
const UINT64 = 4;
|
||||
const INT32 = 5;
|
||||
const FIXED64 = 6;
|
||||
const FIXED32 = 7;
|
||||
const BOOL = 8;
|
||||
const STRING = 9;
|
||||
const GROUP = 10;
|
||||
const MESSAGE = 11;
|
||||
const BYTES = 12;
|
||||
const UINT32 = 13;
|
||||
const ENUM = 14;
|
||||
const SFIXED32 = 15;
|
||||
const SFIXED64 = 16;
|
||||
const SINT32 = 17;
|
||||
const SINT64 = 18;
|
||||
}
|
||||
644
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php
vendored
Normal file
644
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php
vendored
Normal file
@@ -0,0 +1,644 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Duration;
|
||||
use Google\Protobuf\FieldMask;
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\MapField;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
use function bccomp;
|
||||
|
||||
function camel2underscore($input) {
|
||||
preg_match_all(
|
||||
'!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!',
|
||||
$input,
|
||||
$matches);
|
||||
$ret = $matches[0];
|
||||
foreach ($ret as &$match) {
|
||||
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
|
||||
}
|
||||
return implode('_', $ret);
|
||||
}
|
||||
|
||||
class GPBUtil
|
||||
{
|
||||
const NANOS_PER_MILLISECOND = 1000000;
|
||||
const NANOS_PER_MICROSECOND = 1000;
|
||||
const TYPE_URL_PREFIX = 'type.googleapis.com/';
|
||||
|
||||
public static function divideInt64ToInt32($value, &$high, &$low, $trim = false)
|
||||
{
|
||||
$isNeg = (bccomp($value, 0) < 0);
|
||||
if ($isNeg) {
|
||||
$value = bcsub(0, $value);
|
||||
}
|
||||
|
||||
$high = bcdiv($value, 4294967296);
|
||||
$low = bcmod($value, 4294967296);
|
||||
if (bccomp($high, 2147483647) > 0) {
|
||||
$high = (int) bcsub($high, 4294967296);
|
||||
} else {
|
||||
$high = (int) $high;
|
||||
}
|
||||
if (bccomp($low, 2147483647) > 0) {
|
||||
$low = (int) bcsub($low, 4294967296);
|
||||
} else {
|
||||
$low = (int) $low;
|
||||
}
|
||||
|
||||
if ($isNeg) {
|
||||
$high = ~$high;
|
||||
$low = ~$low;
|
||||
$low++;
|
||||
if (!$low) {
|
||||
$high = (int)($high + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($trim) {
|
||||
$high = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkString(&$var, $check_utf8)
|
||||
{
|
||||
if (is_array($var) || is_object($var)) {
|
||||
throw new \InvalidArgumentException("Expect string.");
|
||||
}
|
||||
if (!is_string($var)) {
|
||||
$var = strval($var);
|
||||
}
|
||||
if ($check_utf8 && !preg_match('//u', $var)) {
|
||||
throw new \Exception("Expect utf-8 encoding.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkEnum(&$var)
|
||||
{
|
||||
static::checkInt32($var);
|
||||
}
|
||||
|
||||
public static function checkInt32(&$var)
|
||||
{
|
||||
if (is_numeric($var)) {
|
||||
$var = intval($var);
|
||||
} else {
|
||||
throw new \Exception("Expect integer.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkUint32(&$var)
|
||||
{
|
||||
if (is_numeric($var)) {
|
||||
if (PHP_INT_SIZE === 8) {
|
||||
$var = intval($var);
|
||||
$var |= ((-(($var >> 31) & 0x1)) & ~0xFFFFFFFF);
|
||||
} else {
|
||||
if (bccomp($var, 0x7FFFFFFF) > 0) {
|
||||
$var = bcsub($var, "4294967296");
|
||||
}
|
||||
$var = (int) $var;
|
||||
}
|
||||
} else {
|
||||
throw new \Exception("Expect integer.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkInt64(&$var)
|
||||
{
|
||||
if (is_numeric($var)) {
|
||||
if (PHP_INT_SIZE == 8) {
|
||||
$var = intval($var);
|
||||
} else {
|
||||
if (is_float($var) ||
|
||||
is_integer($var) ||
|
||||
(is_string($var) &&
|
||||
bccomp($var, "9223372036854774784") < 0)) {
|
||||
$var = number_format($var, 0, ".", "");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new \Exception("Expect integer.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkUint64(&$var)
|
||||
{
|
||||
if (is_numeric($var)) {
|
||||
if (PHP_INT_SIZE == 8) {
|
||||
$var = intval($var);
|
||||
} else {
|
||||
$var = number_format($var, 0, ".", "");
|
||||
}
|
||||
} else {
|
||||
throw new \Exception("Expect integer.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkFloat(&$var)
|
||||
{
|
||||
if (is_float($var) || is_numeric($var)) {
|
||||
$var = unpack("f", pack("f", $var))[1];
|
||||
} else {
|
||||
throw new \Exception("Expect float.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkDouble(&$var)
|
||||
{
|
||||
if (is_float($var) || is_numeric($var)) {
|
||||
$var = floatval($var);
|
||||
} else {
|
||||
throw new \Exception("Expect float.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkBool(&$var)
|
||||
{
|
||||
if (is_array($var) || is_object($var)) {
|
||||
throw new \Exception("Expect boolean.");
|
||||
}
|
||||
$var = boolval($var);
|
||||
}
|
||||
|
||||
public static function checkMessage(&$var, $klass, $newClass = null)
|
||||
{
|
||||
if (!$var instanceof $klass && !is_null($var)) {
|
||||
throw new \Exception("Expect $klass.");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkRepeatedField(&$var, $type, $klass = null)
|
||||
{
|
||||
if (!$var instanceof RepeatedField && !is_array($var)) {
|
||||
throw new \Exception("Expect array.");
|
||||
}
|
||||
if (is_array($var)) {
|
||||
$tmp = new RepeatedField($type, $klass);
|
||||
foreach ($var as $value) {
|
||||
$tmp[] = $value;
|
||||
}
|
||||
return $tmp;
|
||||
} else {
|
||||
if ($var->getType() != $type) {
|
||||
throw new \Exception(
|
||||
"Expect repeated field of different type.");
|
||||
}
|
||||
if ($var->getType() === GPBType::MESSAGE &&
|
||||
$var->getClass() !== $klass &&
|
||||
$var->getLegacyClass() !== $klass) {
|
||||
throw new \Exception(
|
||||
"Expect repeated field of " . $klass . ".");
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkMapField(&$var, $key_type, $value_type, $klass = null)
|
||||
{
|
||||
if (!$var instanceof MapField && !is_array($var)) {
|
||||
throw new \Exception("Expect dict.");
|
||||
}
|
||||
if (is_array($var)) {
|
||||
$tmp = new MapField($key_type, $value_type, $klass);
|
||||
foreach ($var as $key => $value) {
|
||||
$tmp[$key] = $value;
|
||||
}
|
||||
return $tmp;
|
||||
} else {
|
||||
if ($var->getKeyType() != $key_type) {
|
||||
throw new \Exception("Expect map field of key type.");
|
||||
}
|
||||
if ($var->getValueType() != $value_type) {
|
||||
throw new \Exception("Expect map field of value type.");
|
||||
}
|
||||
if ($var->getValueType() === GPBType::MESSAGE &&
|
||||
$var->getValueClass() !== $klass &&
|
||||
$var->getLegacyValueClass() !== $klass) {
|
||||
throw new \Exception(
|
||||
"Expect map field of " . $klass . ".");
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
}
|
||||
|
||||
public static function Int64($value)
|
||||
{
|
||||
return new Int64($value);
|
||||
}
|
||||
|
||||
public static function Uint64($value)
|
||||
{
|
||||
return new Uint64($value);
|
||||
}
|
||||
|
||||
public static function getClassNamePrefix(
|
||||
$classname,
|
||||
$file_proto)
|
||||
{
|
||||
$option = $file_proto->getOptions();
|
||||
$prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
|
||||
if ($prefix !== "") {
|
||||
return $prefix;
|
||||
}
|
||||
|
||||
$reserved_words = array(
|
||||
"abstract"=>0, "and"=>0, "array"=>0, "as"=>0, "break"=>0,
|
||||
"callable"=>0, "case"=>0, "catch"=>0, "class"=>0, "clone"=>0,
|
||||
"const"=>0, "continue"=>0, "declare"=>0, "default"=>0, "die"=>0,
|
||||
"do"=>0, "echo"=>0, "else"=>0, "elseif"=>0, "empty"=>0,
|
||||
"enddeclare"=>0, "endfor"=>0, "endforeach"=>0, "endif"=>0,
|
||||
"endswitch"=>0, "endwhile"=>0, "eval"=>0, "exit"=>0, "extends"=>0,
|
||||
"final"=>0, "finally"=>0, "fn"=>0, "for"=>0, "foreach"=>0,
|
||||
"function"=>0, "global"=>0, "goto"=>0, "if"=>0, "implements"=>0,
|
||||
"include"=>0, "include_once"=>0, "instanceof"=>0, "insteadof"=>0,
|
||||
"interface"=>0, "isset"=>0, "list"=>0, "match"=>0, "namespace"=>0,
|
||||
"new"=>0, "or"=>0, "parent"=>0, "print"=>0, "private"=>0,
|
||||
"protected"=>0,"public"=>0, "readonly" => 0,"require"=>0,
|
||||
"require_once"=>0,"return"=>0, "self"=>0, "static"=>0, "switch"=>0,
|
||||
"throw"=>0,"trait"=>0, "try"=>0,"unset"=>0, "use"=>0, "var"=>0,
|
||||
"while"=>0,"xor"=>0, "yield"=>0, "int"=>0, "float"=>0, "bool"=>0,
|
||||
"string"=>0,"true"=>0, "false"=>0, "null"=>0, "void"=>0,
|
||||
"iterable"=>0
|
||||
);
|
||||
|
||||
if (array_key_exists(strtolower($classname), $reserved_words)) {
|
||||
if ($file_proto->getPackage() === "google.protobuf") {
|
||||
return "GPB";
|
||||
} else {
|
||||
return "PB";
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private static function getPreviouslyUnreservedClassNamePrefix(
|
||||
$classname,
|
||||
$file_proto)
|
||||
{
|
||||
$previously_unreserved_words = array(
|
||||
"readonly"=>0
|
||||
);
|
||||
|
||||
if (array_key_exists(strtolower($classname), $previously_unreserved_words)) {
|
||||
$option = $file_proto->getOptions();
|
||||
$prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
|
||||
if ($prefix !== "") {
|
||||
return $prefix;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
return self::getClassNamePrefix($classname, $file_proto);
|
||||
}
|
||||
|
||||
public static function getLegacyClassNameWithoutPackage(
|
||||
$name,
|
||||
$file_proto)
|
||||
{
|
||||
$classname = implode('_', explode('.', $name));
|
||||
return static::getClassNamePrefix($classname, $file_proto) . $classname;
|
||||
}
|
||||
|
||||
public static function getClassNameWithoutPackage(
|
||||
$name,
|
||||
$file_proto)
|
||||
{
|
||||
$parts = explode('.', $name);
|
||||
foreach ($parts as $i => $part) {
|
||||
$parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
|
||||
}
|
||||
return implode('\\', $parts);
|
||||
}
|
||||
|
||||
private static function getPreviouslyUnreservedClassNameWithoutPackage(
|
||||
$name,
|
||||
$file_proto)
|
||||
{
|
||||
$parts = explode('.', $name);
|
||||
foreach ($parts as $i => $part) {
|
||||
$parts[$i] = static::getPreviouslyUnreservedClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
|
||||
}
|
||||
return implode('\\', $parts);
|
||||
}
|
||||
|
||||
public static function getFullClassName(
|
||||
$proto,
|
||||
$containing,
|
||||
$file_proto,
|
||||
&$message_name_without_package,
|
||||
&$classname,
|
||||
&$legacy_classname,
|
||||
&$fullname,
|
||||
&$previous_classname)
|
||||
{
|
||||
// Full name needs to start with '.'.
|
||||
$message_name_without_package = $proto->getName();
|
||||
if ($containing !== "") {
|
||||
$message_name_without_package =
|
||||
$containing . "." . $message_name_without_package;
|
||||
}
|
||||
|
||||
$package = $file_proto->getPackage();
|
||||
if ($package === "") {
|
||||
$fullname = $message_name_without_package;
|
||||
} else {
|
||||
$fullname = $package . "." . $message_name_without_package;
|
||||
}
|
||||
|
||||
$class_name_without_package =
|
||||
static::getClassNameWithoutPackage($message_name_without_package, $file_proto);
|
||||
$legacy_class_name_without_package =
|
||||
static::getLegacyClassNameWithoutPackage(
|
||||
$message_name_without_package, $file_proto);
|
||||
$previous_class_name_without_package =
|
||||
static::getPreviouslyUnreservedClassNameWithoutPackage(
|
||||
$message_name_without_package, $file_proto);
|
||||
|
||||
$option = $file_proto->getOptions();
|
||||
if (!is_null($option) && $option->hasPhpNamespace()) {
|
||||
$namespace = $option->getPhpNamespace();
|
||||
if ($namespace !== "") {
|
||||
$classname = $namespace . "\\" . $class_name_without_package;
|
||||
$legacy_classname =
|
||||
$namespace . "\\" . $legacy_class_name_without_package;
|
||||
$previous_classname =
|
||||
$namespace . "\\" . $previous_class_name_without_package;
|
||||
return;
|
||||
} else {
|
||||
$classname = $class_name_without_package;
|
||||
$legacy_classname = $legacy_class_name_without_package;
|
||||
$previous_classname = $previous_class_name_without_package;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($package === "") {
|
||||
$classname = $class_name_without_package;
|
||||
$legacy_classname = $legacy_class_name_without_package;
|
||||
$previous_classname = $previous_class_name_without_package;
|
||||
} else {
|
||||
$parts = array_map('ucwords', explode('.', $package));
|
||||
foreach ($parts as $i => $part) {
|
||||
$parts[$i] = self::getClassNamePrefix($part, $file_proto).$part;
|
||||
}
|
||||
$classname =
|
||||
implode('\\', $parts) .
|
||||
"\\".self::getClassNamePrefix($class_name_without_package,$file_proto).
|
||||
$class_name_without_package;
|
||||
$legacy_classname =
|
||||
implode('\\', array_map('ucwords', explode('.', $package))).
|
||||
"\\".$legacy_class_name_without_package;
|
||||
$previous_classname =
|
||||
implode('\\', array_map('ucwords', explode('.', $package))).
|
||||
"\\".self::getPreviouslyUnreservedClassNamePrefix(
|
||||
$previous_class_name_without_package, $file_proto).
|
||||
$previous_class_name_without_package;
|
||||
}
|
||||
}
|
||||
|
||||
public static function combineInt32ToInt64($high, $low)
|
||||
{
|
||||
$isNeg = $high < 0;
|
||||
if ($isNeg) {
|
||||
$high = ~$high;
|
||||
$low = ~$low;
|
||||
$low++;
|
||||
if (!$low) {
|
||||
$high = (int) ($high + 1);
|
||||
}
|
||||
}
|
||||
$result = bcadd(bcmul($high, 4294967296), $low);
|
||||
if ($low < 0) {
|
||||
$result = bcadd($result, 4294967296);
|
||||
}
|
||||
if ($isNeg) {
|
||||
$result = bcsub(0, $result);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function parseTimestamp($timestamp)
|
||||
{
|
||||
// prevent parsing timestamps containing with the non-existent year "0000"
|
||||
// DateTime::createFromFormat parses without failing but as a nonsensical date
|
||||
if (substr($timestamp, 0, 4) === "0000") {
|
||||
throw new \Exception("Year cannot be zero.");
|
||||
}
|
||||
// prevent parsing timestamps ending with a lowercase z
|
||||
if (substr($timestamp, -1, 1) === "z") {
|
||||
throw new \Exception("Timezone cannot be a lowercase z.");
|
||||
}
|
||||
|
||||
$nanoseconds = 0;
|
||||
$periodIndex = strpos($timestamp, ".");
|
||||
if ($periodIndex !== false) {
|
||||
$nanosecondsLength = 0;
|
||||
// find the next non-numeric character in the timestamp to calculate
|
||||
// the length of the nanoseconds text
|
||||
for ($i = $periodIndex + 1, $length = strlen($timestamp); $i < $length; $i++) {
|
||||
if (!is_numeric($timestamp[$i])) {
|
||||
$nanosecondsLength = $i - ($periodIndex + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($nanosecondsLength % 3 !== 0) {
|
||||
throw new \Exception("Nanoseconds must be disible by 3.");
|
||||
}
|
||||
if ($nanosecondsLength > 9) {
|
||||
throw new \Exception("Nanoseconds must be in the range of 0 to 999,999,999 nanoseconds.");
|
||||
}
|
||||
if ($nanosecondsLength > 0) {
|
||||
$nanoseconds = substr($timestamp, $periodIndex + 1, $nanosecondsLength);
|
||||
$nanoseconds = intval($nanoseconds);
|
||||
|
||||
if ($nanosecondsLength < 9) {
|
||||
$nanoseconds = $nanoseconds * pow(10, 9 - $nanosecondsLength);
|
||||
}
|
||||
|
||||
// remove the nanoseconds and preceding period from the timestamp
|
||||
$date = substr($timestamp, 0, $periodIndex);
|
||||
$timezone = substr($timestamp, $periodIndex + $nanosecondsLength + 1);
|
||||
$timestamp = $date.$timezone;
|
||||
}
|
||||
}
|
||||
|
||||
$date = \DateTime::createFromFormat(\DateTime::RFC3339, $timestamp, new \DateTimeZone("UTC"));
|
||||
if ($date === false) {
|
||||
throw new \Exception("Invalid RFC 3339 timestamp.");
|
||||
}
|
||||
|
||||
$value = new \Google\Protobuf\Timestamp();
|
||||
$seconds = $date->format("U");
|
||||
$value->setSeconds($seconds);
|
||||
$value->setNanos($nanoseconds);
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function formatTimestamp($value)
|
||||
{
|
||||
if (bccomp($value->getSeconds(), "253402300800") != -1) {
|
||||
throw new GPBDecodeException("Duration number too large.");
|
||||
}
|
||||
if (bccomp($value->getSeconds(), "-62135596801") != 1) {
|
||||
throw new GPBDecodeException("Duration number too small.");
|
||||
}
|
||||
$nanoseconds = static::getNanosecondsForTimestamp($value->getNanos());
|
||||
if (!empty($nanoseconds)) {
|
||||
$nanoseconds = ".".$nanoseconds;
|
||||
}
|
||||
$date = new \DateTime('@'.$value->getSeconds(), new \DateTimeZone("UTC"));
|
||||
return $date->format("Y-m-d\TH:i:s".$nanoseconds."\Z");
|
||||
}
|
||||
|
||||
public static function parseDuration($value)
|
||||
{
|
||||
if (strlen($value) < 2 || substr($value, -1) !== "s") {
|
||||
throw new GPBDecodeException("Missing s after duration string");
|
||||
}
|
||||
$number = substr($value, 0, -1);
|
||||
if (bccomp($number, "315576000001") != -1) {
|
||||
throw new GPBDecodeException("Duration number too large.");
|
||||
}
|
||||
if (bccomp($number, "-315576000001") != 1) {
|
||||
throw new GPBDecodeException("Duration number too small.");
|
||||
}
|
||||
$pos = strrpos($number, ".");
|
||||
if ($pos !== false) {
|
||||
$seconds = substr($number, 0, $pos);
|
||||
if (bccomp($seconds, 0) < 0) {
|
||||
$nanos = bcmul("0" . substr($number, $pos), -1000000000);
|
||||
} else {
|
||||
$nanos = bcmul("0" . substr($number, $pos), 1000000000);
|
||||
}
|
||||
} else {
|
||||
$seconds = $number;
|
||||
$nanos = 0;
|
||||
}
|
||||
$duration = new Duration();
|
||||
$duration->setSeconds($seconds);
|
||||
$duration->setNanos($nanos);
|
||||
return $duration;
|
||||
}
|
||||
|
||||
public static function formatDuration($value)
|
||||
{
|
||||
if (bccomp($value->getSeconds(), '315576000001') != -1) {
|
||||
throw new GPBDecodeException('Duration number too large.');
|
||||
}
|
||||
if (bccomp($value->getSeconds(), '-315576000001') != 1) {
|
||||
throw new GPBDecodeException('Duration number too small.');
|
||||
}
|
||||
|
||||
$nanos = $value->getNanos();
|
||||
if ($nanos === 0) {
|
||||
return (string) $value->getSeconds();
|
||||
}
|
||||
|
||||
if ($nanos % 1000000 === 0) {
|
||||
$digits = 3;
|
||||
} elseif ($nanos % 1000 === 0) {
|
||||
$digits = 6;
|
||||
} else {
|
||||
$digits = 9;
|
||||
}
|
||||
|
||||
$nanos = bcdiv($nanos, '1000000000', $digits);
|
||||
return bcadd($value->getSeconds(), $nanos, $digits);
|
||||
}
|
||||
|
||||
public static function parseFieldMask($paths_string)
|
||||
{
|
||||
$field_mask = new FieldMask();
|
||||
if (strlen($paths_string) === 0) {
|
||||
return $field_mask;
|
||||
}
|
||||
$path_strings = explode(",", $paths_string);
|
||||
$paths = $field_mask->getPaths();
|
||||
foreach($path_strings as &$path_string) {
|
||||
$field_strings = explode(".", $path_string);
|
||||
foreach($field_strings as &$field_string) {
|
||||
$field_string = camel2underscore($field_string);
|
||||
}
|
||||
$path_string = implode(".", $field_strings);
|
||||
$paths[] = $path_string;
|
||||
}
|
||||
return $field_mask;
|
||||
}
|
||||
|
||||
public static function formatFieldMask($field_mask)
|
||||
{
|
||||
$converted_paths = [];
|
||||
foreach($field_mask->getPaths() as $path) {
|
||||
$fields = explode('.', $path);
|
||||
$converted_path = [];
|
||||
foreach ($fields as $field) {
|
||||
$segments = explode('_', $field);
|
||||
$start = true;
|
||||
$converted_segments = "";
|
||||
foreach($segments as $segment) {
|
||||
if (!$start) {
|
||||
$converted = ucfirst($segment);
|
||||
} else {
|
||||
$converted = $segment;
|
||||
$start = false;
|
||||
}
|
||||
$converted_segments .= $converted;
|
||||
}
|
||||
$converted_path []= $converted_segments;
|
||||
}
|
||||
$converted_path = implode(".", $converted_path);
|
||||
$converted_paths []= $converted_path;
|
||||
}
|
||||
return implode(",", $converted_paths);
|
||||
}
|
||||
|
||||
public static function getNanosecondsForTimestamp($nanoseconds)
|
||||
{
|
||||
if ($nanoseconds == 0) {
|
||||
return '';
|
||||
}
|
||||
if ($nanoseconds % static::NANOS_PER_MILLISECOND == 0) {
|
||||
return sprintf('%03d', $nanoseconds / static::NANOS_PER_MILLISECOND);
|
||||
}
|
||||
if ($nanoseconds % static::NANOS_PER_MICROSECOND == 0) {
|
||||
return sprintf('%06d', $nanoseconds / static::NANOS_PER_MICROSECOND);
|
||||
}
|
||||
return sprintf('%09d', $nanoseconds);
|
||||
}
|
||||
|
||||
public static function hasSpecialJsonMapping($msg)
|
||||
{
|
||||
return is_a($msg, 'Google\Protobuf\Any') ||
|
||||
is_a($msg, "Google\Protobuf\ListValue") ||
|
||||
is_a($msg, "Google\Protobuf\Struct") ||
|
||||
is_a($msg, "Google\Protobuf\Value") ||
|
||||
is_a($msg, "Google\Protobuf\Duration") ||
|
||||
is_a($msg, "Google\Protobuf\Timestamp") ||
|
||||
is_a($msg, "Google\Protobuf\FieldMask") ||
|
||||
static::hasJsonValue($msg);
|
||||
}
|
||||
|
||||
public static function hasJsonValue($msg)
|
||||
{
|
||||
return is_a($msg, "Google\Protobuf\DoubleValue") ||
|
||||
is_a($msg, "Google\Protobuf\FloatValue") ||
|
||||
is_a($msg, "Google\Protobuf\Int64Value") ||
|
||||
is_a($msg, "Google\Protobuf\UInt64Value") ||
|
||||
is_a($msg, "Google\Protobuf\Int32Value") ||
|
||||
is_a($msg, "Google\Protobuf\UInt32Value") ||
|
||||
is_a($msg, "Google\Protobuf\BoolValue") ||
|
||||
is_a($msg, "Google\Protobuf\StringValue") ||
|
||||
is_a($msg, "Google\Protobuf\BytesValue");
|
||||
}
|
||||
}
|
||||
599
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
vendored
Normal file
599
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
vendored
Normal file
@@ -0,0 +1,599 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class GPBWire
|
||||
{
|
||||
|
||||
const TAG_TYPE_BITS = 3;
|
||||
|
||||
const WIRETYPE_VARINT = 0;
|
||||
const WIRETYPE_FIXED64 = 1;
|
||||
const WIRETYPE_LENGTH_DELIMITED = 2;
|
||||
const WIRETYPE_START_GROUP = 3;
|
||||
const WIRETYPE_END_GROUP = 4;
|
||||
const WIRETYPE_FIXED32 = 5;
|
||||
|
||||
const UNKNOWN = 0;
|
||||
const NORMAL_FORMAT = 1;
|
||||
const PACKED_FORMAT = 2;
|
||||
|
||||
public static function getTagFieldNumber($tag)
|
||||
{
|
||||
// We have to mask because PHP has no arithmetic shift.
|
||||
return ($tag >> self::TAG_TYPE_BITS) & 0x1fffffff;
|
||||
}
|
||||
|
||||
public static function getTagWireType($tag)
|
||||
{
|
||||
return $tag & 0x7;
|
||||
}
|
||||
|
||||
public static function getWireType($type)
|
||||
{
|
||||
switch ($type) {
|
||||
case GPBType::FLOAT:
|
||||
case GPBType::FIXED32:
|
||||
case GPBType::SFIXED32:
|
||||
return self::WIRETYPE_FIXED32;
|
||||
case GPBType::DOUBLE:
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::SFIXED64:
|
||||
return self::WIRETYPE_FIXED64;
|
||||
case GPBType::UINT32:
|
||||
case GPBType::UINT64:
|
||||
case GPBType::INT32:
|
||||
case GPBType::INT64:
|
||||
case GPBType::SINT32:
|
||||
case GPBType::SINT64:
|
||||
case GPBType::ENUM:
|
||||
case GPBType::BOOL:
|
||||
return self::WIRETYPE_VARINT;
|
||||
case GPBType::STRING:
|
||||
case GPBType::BYTES:
|
||||
case GPBType::MESSAGE:
|
||||
return self::WIRETYPE_LENGTH_DELIMITED;
|
||||
case GPBType::GROUP:
|
||||
user_error("Unsupported type.");
|
||||
return 0;
|
||||
default:
|
||||
user_error("Unsupported type.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ZigZag Transform: Encodes signed integers so that they can be effectively
|
||||
// used with varint encoding.
|
||||
//
|
||||
// varint operates on unsigned integers, encoding smaller numbers into fewer
|
||||
// bytes. If you try to use it on a signed integer, it will treat this
|
||||
// number as a very large unsigned integer, which means that even small
|
||||
// signed numbers like -1 will take the maximum number of bytes (10) to
|
||||
// encode. zigZagEncode() maps signed integers to unsigned in such a way
|
||||
// that those with a small absolute value will have smaller encoded values,
|
||||
// making them appropriate for encoding using varint.
|
||||
//
|
||||
// int32 -> uint32
|
||||
// -------------------------
|
||||
// 0 -> 0
|
||||
// -1 -> 1
|
||||
// 1 -> 2
|
||||
// -2 -> 3
|
||||
// ... -> ...
|
||||
// 2147483647 -> 4294967294
|
||||
// -2147483648 -> 4294967295
|
||||
//
|
||||
// >> encode >>
|
||||
// << decode <<
|
||||
public static function zigZagEncode32($int32)
|
||||
{
|
||||
if (PHP_INT_SIZE == 8) {
|
||||
$trim_int32 = $int32 & 0xFFFFFFFF;
|
||||
return (($trim_int32 << 1) ^ ($int32 << 32 >> 63)) & 0xFFFFFFFF;
|
||||
} else {
|
||||
return ($int32 << 1) ^ ($int32 >> 31);
|
||||
}
|
||||
}
|
||||
|
||||
public static function zigZagDecode32($uint32)
|
||||
{
|
||||
// Fill high 32 bits.
|
||||
if (PHP_INT_SIZE === 8) {
|
||||
$uint32 |= ($uint32 & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
$int32 = (($uint32 >> 1) & 0x7FFFFFFF) ^ (-($uint32 & 1));
|
||||
|
||||
return $int32;
|
||||
}
|
||||
|
||||
public static function zigZagEncode64($int64)
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
if (bccomp($int64, 0) >= 0) {
|
||||
return bcmul($int64, 2);
|
||||
} else {
|
||||
return bcsub(bcmul(bcsub(0, $int64), 2), 1);
|
||||
}
|
||||
} else {
|
||||
return ((int)$int64 << 1) ^ ((int)$int64 >> 63);
|
||||
}
|
||||
}
|
||||
|
||||
public static function zigZagDecode64($uint64)
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
if (bcmod($uint64, 2) == 0) {
|
||||
return bcdiv($uint64, 2, 0);
|
||||
} else {
|
||||
return bcsub(0, bcdiv(bcadd($uint64, 1), 2, 0));
|
||||
}
|
||||
} else {
|
||||
return (($uint64 >> 1) & 0x7FFFFFFFFFFFFFFF) ^ (-($uint64 & 1));
|
||||
}
|
||||
}
|
||||
|
||||
public static function readInt32(&$input, &$value)
|
||||
{
|
||||
return $input->readVarint32($value);
|
||||
}
|
||||
|
||||
public static function readInt64(&$input, &$value)
|
||||
{
|
||||
$success = $input->readVarint64($value);
|
||||
if (PHP_INT_SIZE == 4 && bccomp($value, "9223372036854775807") > 0) {
|
||||
$value = bcsub($value, "18446744073709551616");
|
||||
}
|
||||
return $success;
|
||||
}
|
||||
|
||||
public static function readUint32(&$input, &$value)
|
||||
{
|
||||
return self::readInt32($input, $value);
|
||||
}
|
||||
|
||||
public static function readUint64(&$input, &$value)
|
||||
{
|
||||
return self::readInt64($input, $value);
|
||||
}
|
||||
|
||||
public static function readSint32(&$input, &$value)
|
||||
{
|
||||
if (!$input->readVarint32($value)) {
|
||||
return false;
|
||||
}
|
||||
$value = GPBWire::zigZagDecode32($value);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readSint64(&$input, &$value)
|
||||
{
|
||||
if (!$input->readVarint64($value)) {
|
||||
return false;
|
||||
}
|
||||
$value = GPBWire::zigZagDecode64($value);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readFixed32(&$input, &$value)
|
||||
{
|
||||
return $input->readLittleEndian32($value);
|
||||
}
|
||||
|
||||
public static function readFixed64(&$input, &$value)
|
||||
{
|
||||
return $input->readLittleEndian64($value);
|
||||
}
|
||||
|
||||
public static function readSfixed32(&$input, &$value)
|
||||
{
|
||||
if (!self::readFixed32($input, $value)) {
|
||||
return false;
|
||||
}
|
||||
if (PHP_INT_SIZE === 8) {
|
||||
$value |= (-($value >> 31) << 32);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readSfixed64(&$input, &$value)
|
||||
{
|
||||
$success = $input->readLittleEndian64($value);
|
||||
if (PHP_INT_SIZE == 4 && bccomp($value, "9223372036854775807") > 0) {
|
||||
$value = bcsub($value, "18446744073709551616");
|
||||
}
|
||||
return $success;
|
||||
}
|
||||
|
||||
public static function readFloat(&$input, &$value)
|
||||
{
|
||||
$data = null;
|
||||
if (!$input->readRaw(4, $data)) {
|
||||
return false;
|
||||
}
|
||||
$value = unpack('g', $data)[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readDouble(&$input, &$value)
|
||||
{
|
||||
$data = null;
|
||||
if (!$input->readRaw(8, $data)) {
|
||||
return false;
|
||||
}
|
||||
$value = unpack('e', $data)[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readBool(&$input, &$value)
|
||||
{
|
||||
if (!$input->readVarint64($value)) {
|
||||
return false;
|
||||
}
|
||||
if ($value == 0) {
|
||||
$value = false;
|
||||
} else {
|
||||
$value = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function readString(&$input, &$value)
|
||||
{
|
||||
$length = 0;
|
||||
return $input->readVarintSizeAsInt($length) && $input->readRaw($length, $value);
|
||||
}
|
||||
|
||||
public static function readMessage(&$input, &$message)
|
||||
{
|
||||
$length = 0;
|
||||
if (!$input->readVarintSizeAsInt($length)) {
|
||||
return false;
|
||||
}
|
||||
$old_limit = 0;
|
||||
$recursion_limit = 0;
|
||||
$input->incrementRecursionDepthAndPushLimit(
|
||||
$length,
|
||||
$old_limit,
|
||||
$recursion_limit);
|
||||
if ($recursion_limit < 0 || !$message->parseFromStream($input)) {
|
||||
return false;
|
||||
}
|
||||
return $input->decrementRecursionDepthAndPopLimit($old_limit);
|
||||
}
|
||||
|
||||
public static function writeTag(&$output, $tag)
|
||||
{
|
||||
return $output->writeTag($tag);
|
||||
}
|
||||
|
||||
public static function writeInt32(&$output, $value)
|
||||
{
|
||||
return $output->writeVarint32($value, false);
|
||||
}
|
||||
|
||||
public static function writeInt64(&$output, $value)
|
||||
{
|
||||
return $output->writeVarint64($value);
|
||||
}
|
||||
|
||||
public static function writeUint32(&$output, $value)
|
||||
{
|
||||
return $output->writeVarint32($value, true);
|
||||
}
|
||||
|
||||
public static function writeUint64(&$output, $value)
|
||||
{
|
||||
return $output->writeVarint64($value);
|
||||
}
|
||||
|
||||
public static function writeSint32(&$output, $value)
|
||||
{
|
||||
$value = GPBWire::zigZagEncode32($value);
|
||||
return $output->writeVarint32($value, true);
|
||||
}
|
||||
|
||||
public static function writeSint64(&$output, $value)
|
||||
{
|
||||
$value = GPBWire::zigZagEncode64($value);
|
||||
return $output->writeVarint64($value);
|
||||
}
|
||||
|
||||
public static function writeFixed32(&$output, $value)
|
||||
{
|
||||
return $output->writeLittleEndian32($value);
|
||||
}
|
||||
|
||||
public static function writeFixed64(&$output, $value)
|
||||
{
|
||||
return $output->writeLittleEndian64($value);
|
||||
}
|
||||
|
||||
public static function writeSfixed32(&$output, $value)
|
||||
{
|
||||
return $output->writeLittleEndian32($value);
|
||||
}
|
||||
|
||||
public static function writeSfixed64(&$output, $value)
|
||||
{
|
||||
return $output->writeLittleEndian64($value);
|
||||
}
|
||||
|
||||
public static function writeBool(&$output, $value)
|
||||
{
|
||||
if ($value) {
|
||||
return $output->writeVarint32(1, true);
|
||||
} else {
|
||||
return $output->writeVarint32(0, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static function writeFloat(&$output, $value)
|
||||
{
|
||||
$data = pack("g", $value);
|
||||
return $output->writeRaw($data, 4);
|
||||
}
|
||||
|
||||
public static function writeDouble(&$output, $value)
|
||||
{
|
||||
$data = pack("e", $value);
|
||||
return $output->writeRaw($data, 8);
|
||||
}
|
||||
|
||||
public static function writeString(&$output, $value)
|
||||
{
|
||||
return self::writeBytes($output, $value);
|
||||
}
|
||||
|
||||
public static function writeBytes(&$output, $value)
|
||||
{
|
||||
$size = strlen($value);
|
||||
if (!$output->writeVarint32($size, true)) {
|
||||
return false;
|
||||
}
|
||||
return $output->writeRaw($value, $size);
|
||||
}
|
||||
|
||||
public static function writeMessage(&$output, $value)
|
||||
{
|
||||
$size = $value->byteSize();
|
||||
if (!$output->writeVarint32($size, true)) {
|
||||
return false;
|
||||
}
|
||||
return $value->serializeToStream($output);
|
||||
}
|
||||
|
||||
public static function makeTag($number, $type)
|
||||
{
|
||||
return ($number << 3) | self::getWireType($type);
|
||||
}
|
||||
|
||||
public static function tagSize($field)
|
||||
{
|
||||
$tag = self::makeTag($field->getNumber(), $field->getType());
|
||||
return self::varint32Size($tag);
|
||||
}
|
||||
|
||||
public static function varint32Size($value, $sign_extended = false)
|
||||
{
|
||||
if ($value < 0) {
|
||||
if ($sign_extended) {
|
||||
return 10;
|
||||
} else {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
if ($value < (1 << 7)) {
|
||||
return 1;
|
||||
}
|
||||
if ($value < (1 << 14)) {
|
||||
return 2;
|
||||
}
|
||||
if ($value < (1 << 21)) {
|
||||
return 3;
|
||||
}
|
||||
if ($value < (1 << 28)) {
|
||||
return 4;
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
|
||||
public static function sint32Size($value)
|
||||
{
|
||||
$value = self::zigZagEncode32($value);
|
||||
return self::varint32Size($value);
|
||||
}
|
||||
|
||||
public static function sint64Size($value)
|
||||
{
|
||||
$value = self::zigZagEncode64($value);
|
||||
return self::varint64Size($value);
|
||||
}
|
||||
|
||||
public static function varint64Size($value)
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
if (bccomp($value, 0) < 0 ||
|
||||
bccomp($value, "9223372036854775807") > 0) {
|
||||
return 10;
|
||||
}
|
||||
if (bccomp($value, 1 << 7) < 0) {
|
||||
return 1;
|
||||
}
|
||||
if (bccomp($value, 1 << 14) < 0) {
|
||||
return 2;
|
||||
}
|
||||
if (bccomp($value, 1 << 21) < 0) {
|
||||
return 3;
|
||||
}
|
||||
if (bccomp($value, 1 << 28) < 0) {
|
||||
return 4;
|
||||
}
|
||||
if (bccomp($value, '34359738368') < 0) {
|
||||
return 5;
|
||||
}
|
||||
if (bccomp($value, '4398046511104') < 0) {
|
||||
return 6;
|
||||
}
|
||||
if (bccomp($value, '562949953421312') < 0) {
|
||||
return 7;
|
||||
}
|
||||
if (bccomp($value, '72057594037927936') < 0) {
|
||||
return 8;
|
||||
}
|
||||
return 9;
|
||||
} else {
|
||||
if ($value < 0) {
|
||||
return 10;
|
||||
}
|
||||
if ($value < (1 << 7)) {
|
||||
return 1;
|
||||
}
|
||||
if ($value < (1 << 14)) {
|
||||
return 2;
|
||||
}
|
||||
if ($value < (1 << 21)) {
|
||||
return 3;
|
||||
}
|
||||
if ($value < (1 << 28)) {
|
||||
return 4;
|
||||
}
|
||||
if ($value < (1 << 35)) {
|
||||
return 5;
|
||||
}
|
||||
if ($value < (1 << 42)) {
|
||||
return 6;
|
||||
}
|
||||
if ($value < (1 << 49)) {
|
||||
return 7;
|
||||
}
|
||||
if ($value < (1 << 56)) {
|
||||
return 8;
|
||||
}
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
|
||||
public static function serializeFieldToStream(
|
||||
$value,
|
||||
$field,
|
||||
$need_tag,
|
||||
&$output)
|
||||
{
|
||||
if ($need_tag) {
|
||||
if (!GPBWire::writeTag(
|
||||
$output,
|
||||
self::makeTag(
|
||||
$field->getNumber(),
|
||||
$field->getType()))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
switch ($field->getType()) {
|
||||
case GPBType::DOUBLE:
|
||||
if (!GPBWire::writeDouble($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::FLOAT:
|
||||
if (!GPBWire::writeFloat($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::INT64:
|
||||
if (!GPBWire::writeInt64($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::UINT64:
|
||||
if (!GPBWire::writeUint64($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::INT32:
|
||||
if (!GPBWire::writeInt32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::FIXED32:
|
||||
if (!GPBWire::writeFixed32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::FIXED64:
|
||||
if (!GPBWire::writeFixed64($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::BOOL:
|
||||
if (!GPBWire::writeBool($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::STRING:
|
||||
if (!GPBWire::writeString($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
// case GPBType::GROUP:
|
||||
// echo "GROUP\xA";
|
||||
// trigger_error("Not implemented.", E_ERROR);
|
||||
// break;
|
||||
case GPBType::MESSAGE:
|
||||
if (!GPBWire::writeMessage($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::BYTES:
|
||||
if (!GPBWire::writeBytes($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::UINT32:
|
||||
if (PHP_INT_SIZE === 8 && $value < 0) {
|
||||
$value += 4294967296;
|
||||
}
|
||||
if (!GPBWire::writeUint32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::ENUM:
|
||||
if (!GPBWire::writeInt32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::SFIXED32:
|
||||
if (!GPBWire::writeSfixed32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::SFIXED64:
|
||||
if (!GPBWire::writeSfixed64($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::SINT32:
|
||||
if (!GPBWire::writeSint32($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GPBType::SINT64:
|
||||
if (!GPBWire::writeSint64($output, $value)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
user_error("Unsupported type.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
20
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
vendored
Normal file
20
vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
class GPBWireType
|
||||
{
|
||||
const VARINT = 0;
|
||||
const FIXED64 = 1;
|
||||
const LENGTH_DELIMITED = 2;
|
||||
const START_GROUP = 3;
|
||||
const END_GROUP = 4;
|
||||
const FIXED32 = 5;
|
||||
}
|
||||
76
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
vendored
Normal file
76
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Describes the relationship between generated code and its original source
|
||||
* file. A GeneratedCodeInfo message is associated with only one generated
|
||||
* source file, but may contain references to different source .proto files.
|
||||
*
|
||||
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
|
||||
*/
|
||||
class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* An Annotation connects some span of text in generated code to an element
|
||||
* of its generating .proto file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
|
||||
*/
|
||||
private $annotation;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[] $annotation
|
||||
* An Annotation connects some span of text in generated code to an element
|
||||
* of its generating .proto file.
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* An Annotation connects some span of text in generated code to an element
|
||||
* of its generating .proto file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
|
||||
* @return RepeatedField<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>
|
||||
*/
|
||||
public function getAnnotation()
|
||||
{
|
||||
return $this->annotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* An Annotation connects some span of text in generated code to an element
|
||||
* of its generating .proto file.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
|
||||
* @param \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setAnnotation($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class);
|
||||
$this->annotation = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
253
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
vendored
Normal file
253
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\GeneratedCodeInfo;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\GPBWire;
|
||||
use Google\Protobuf\Internal\InputStream;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
use Google\Protobuf\RepeatedField;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
|
||||
*/
|
||||
class Annotation extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Identifies the element in the original source .proto file. This field
|
||||
* is formatted the same as SourceCodeInfo.Location.path.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
|
||||
*/
|
||||
private $path;
|
||||
/**
|
||||
* Identifies the filesystem path to the original source .proto.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string source_file = 2;</code>
|
||||
*/
|
||||
protected $source_file = null;
|
||||
/**
|
||||
* Identifies the starting offset in bytes in the generated code
|
||||
* that relates to the identified object.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 begin = 3;</code>
|
||||
*/
|
||||
protected $begin = null;
|
||||
/**
|
||||
* Identifies the ending offset in bytes in the generated code that
|
||||
* relates to the identified object. The end offset should be one past
|
||||
* the last relevant byte (so the length of the text = end - begin).
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 4;</code>
|
||||
*/
|
||||
protected $end = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
|
||||
*/
|
||||
protected $semantic = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int[] $path
|
||||
* Identifies the element in the original source .proto file. This field
|
||||
* is formatted the same as SourceCodeInfo.Location.path.
|
||||
* @type string $source_file
|
||||
* Identifies the filesystem path to the original source .proto.
|
||||
* @type int $begin
|
||||
* Identifies the starting offset in bytes in the generated code
|
||||
* that relates to the identified object.
|
||||
* @type int $end
|
||||
* Identifies the ending offset in bytes in the generated code that
|
||||
* relates to the identified object. The end offset should be one past
|
||||
* the last relevant byte (so the length of the text = end - begin).
|
||||
* @type int $semantic
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the element in the original source .proto file. This field
|
||||
* is formatted the same as SourceCodeInfo.Location.path.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
|
||||
* @return RepeatedField<int>
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the element in the original source .proto file. This field
|
||||
* is formatted the same as SourceCodeInfo.Location.path.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
|
||||
* @param int[] $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPath($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
|
||||
$this->path = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the filesystem path to the original source .proto.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string source_file = 2;</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getSourceFile()
|
||||
{
|
||||
return isset($this->source_file) ? $this->source_file : '';
|
||||
}
|
||||
|
||||
public function hasSourceFile()
|
||||
{
|
||||
return isset($this->source_file);
|
||||
}
|
||||
|
||||
public function clearSourceFile()
|
||||
{
|
||||
unset($this->source_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the filesystem path to the original source .proto.
|
||||
*
|
||||
* Generated from protobuf field <code>optional string source_file = 2;</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSourceFile($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->source_file = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the starting offset in bytes in the generated code
|
||||
* that relates to the identified object.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 begin = 3;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getBegin()
|
||||
{
|
||||
return isset($this->begin) ? $this->begin : 0;
|
||||
}
|
||||
|
||||
public function hasBegin()
|
||||
{
|
||||
return isset($this->begin);
|
||||
}
|
||||
|
||||
public function clearBegin()
|
||||
{
|
||||
unset($this->begin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the starting offset in bytes in the generated code
|
||||
* that relates to the identified object.
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 begin = 3;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setBegin($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->begin = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the ending offset in bytes in the generated code that
|
||||
* relates to the identified object. The end offset should be one past
|
||||
* the last relevant byte (so the length of the text = end - begin).
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 4;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return isset($this->end) ? $this->end : 0;
|
||||
}
|
||||
|
||||
public function hasEnd()
|
||||
{
|
||||
return isset($this->end);
|
||||
}
|
||||
|
||||
public function clearEnd()
|
||||
{
|
||||
unset($this->end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the ending offset in bytes in the generated code that
|
||||
* relates to the identified object. The end offset should be one past
|
||||
* the last relevant byte (so the length of the text = end - begin).
|
||||
*
|
||||
* Generated from protobuf field <code>optional int32 end = 4;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnd($var)
|
||||
{
|
||||
GPBUtil::checkInt32($var);
|
||||
$this->end = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getSemantic()
|
||||
{
|
||||
return isset($this->semantic) ? $this->semantic : 0;
|
||||
}
|
||||
|
||||
public function hasSemantic()
|
||||
{
|
||||
return isset($this->semantic);
|
||||
}
|
||||
|
||||
public function clearSemantic()
|
||||
{
|
||||
unset($this->semantic);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSemantic($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation\Semantic::class);
|
||||
$this->semantic = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
63
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation/Semantic.php
vendored
Normal file
63
vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation/Semantic.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: google/protobuf/descriptor.proto
|
||||
|
||||
namespace Google\Protobuf\Internal\GeneratedCodeInfo\Annotation;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Represents the identified object's effect on the element in the original
|
||||
* .proto file.
|
||||
*
|
||||
* Protobuf type <code>google.protobuf.GeneratedCodeInfo.Annotation.Semantic</code>
|
||||
*/
|
||||
class Semantic
|
||||
{
|
||||
/**
|
||||
* There is no effect or the effect is indescribable.
|
||||
*
|
||||
* Generated from protobuf enum <code>NONE = 0;</code>
|
||||
*/
|
||||
const NONE = 0;
|
||||
/**
|
||||
* The element is set or otherwise mutated.
|
||||
*
|
||||
* Generated from protobuf enum <code>SET = 1;</code>
|
||||
*/
|
||||
const SET = 1;
|
||||
/**
|
||||
* An alias to the element is returned.
|
||||
*
|
||||
* Generated from protobuf enum <code>ALIAS = 2;</code>
|
||||
*/
|
||||
const ALIAS = 2;
|
||||
|
||||
private static $valueToName = [
|
||||
self::NONE => 'NONE',
|
||||
self::SET => 'SET',
|
||||
self::ALIAS => 'ALIAS',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
18
vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php
vendored
Normal file
18
vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
trait GetPublicDescriptorTrait
|
||||
{
|
||||
private function getPublicDescriptor($desc)
|
||||
{
|
||||
return is_null($desc) ? null : $desc->getPublicDescriptor();
|
||||
}
|
||||
}
|
||||
20
vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
vendored
Normal file
20
vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
trait HasPublicDescriptorTrait
|
||||
{
|
||||
private $public_desc;
|
||||
|
||||
public function getPublicDescriptor()
|
||||
{
|
||||
return $this->public_desc;
|
||||
}
|
||||
}
|
||||
48
vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
vendored
Normal file
48
vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\Message;
|
||||
|
||||
class MapEntry extends Message
|
||||
{
|
||||
public $key;
|
||||
public $value;
|
||||
|
||||
public function __construct($desc) {
|
||||
parent::__construct($desc);
|
||||
// For MapEntry, getValue should always return a valid value. Thus, we
|
||||
// need to create a default instance value if the value type is
|
||||
// message, in case no value is provided in data.
|
||||
$value_field = $desc->getFieldByNumber(2);
|
||||
if ($value_field->getType() == GPBType::MESSAGE) {
|
||||
$klass = $value_field->getMessageType()->getClass();
|
||||
$value = new $klass;
|
||||
$this->setValue($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function setKey($key) {
|
||||
$this->key = $key;
|
||||
}
|
||||
|
||||
public function getKey() {
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
public function setValue($value) {
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getValue() {
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
275
vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
vendored
Normal file
275
vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
vendored
Normal file
@@ -0,0 +1,275 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
/**
|
||||
* MapField and MapFieldIter are used by generated protocol message classes to
|
||||
* manipulate map fields.
|
||||
*/
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* MapField is used by generated protocol message classes to manipulate map
|
||||
* fields. It can be used like native PHP array.
|
||||
*/
|
||||
class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $container;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $key_type;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $value_type;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $klass;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $legacy_klass;
|
||||
|
||||
/**
|
||||
* Constructs an instance of MapField.
|
||||
*
|
||||
* @param long $key_type Type of the stored key element.
|
||||
* @param long $value_type Type of the stored value element.
|
||||
* @param string $klass Message/Enum class name of value instance
|
||||
* (message/enum fields only).
|
||||
* @ignore
|
||||
*/
|
||||
public function __construct($key_type, $value_type, $klass = null)
|
||||
{
|
||||
$this->container = [];
|
||||
$this->key_type = $key_type;
|
||||
$this->value_type = $value_type;
|
||||
$this->klass = $klass;
|
||||
|
||||
if ($this->value_type == GPBType::MESSAGE) {
|
||||
$pool = DescriptorPool::getGeneratedPool();
|
||||
$desc = $pool->getDescriptorByClassName($klass);
|
||||
if ($desc == NULL) {
|
||||
new $klass; // No msg class instance has been created before.
|
||||
$desc = $pool->getDescriptorByClassName($klass);
|
||||
}
|
||||
$this->klass = $desc->getClass();
|
||||
$this->legacy_klass = $desc->getLegacyClass();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public function getKeyType()
|
||||
{
|
||||
return $this->key_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public function getValueType()
|
||||
{
|
||||
return $this->value_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public function getValueClass()
|
||||
{
|
||||
return $this->klass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public function getLegacyValueClass()
|
||||
{
|
||||
return $this->legacy_klass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the element at the given key.
|
||||
*
|
||||
* This will also be called for: $ele = $arr[$key]
|
||||
*
|
||||
* @param int|string $key The key of the element to be fetched.
|
||||
* @return object The stored element at given key.
|
||||
* @throws \ErrorException Invalid type for index.
|
||||
* @throws \ErrorException Non-existing index.
|
||||
* @todo need to add return type mixed (require update php version to 8.0)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($key)
|
||||
{
|
||||
return $this->container[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign the element at the given key.
|
||||
*
|
||||
* This will also be called for: $arr[$key] = $value
|
||||
*
|
||||
* @param int|string $key The key of the element to be fetched.
|
||||
* @param object $value The element to be assigned.
|
||||
* @return void
|
||||
* @throws \ErrorException Invalid type for key.
|
||||
* @throws \ErrorException Invalid type for value.
|
||||
* @throws \ErrorException Non-existing key.
|
||||
* @todo need to add return type void (require update php version to 7.1)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
$this->checkKey($this->key_type, $key);
|
||||
|
||||
switch ($this->value_type) {
|
||||
case GPBType::SFIXED32:
|
||||
case GPBType::SINT32:
|
||||
case GPBType::INT32:
|
||||
case GPBType::ENUM:
|
||||
GPBUtil::checkInt32($value);
|
||||
break;
|
||||
case GPBType::FIXED32:
|
||||
case GPBType::UINT32:
|
||||
GPBUtil::checkUint32($value);
|
||||
break;
|
||||
case GPBType::SFIXED64:
|
||||
case GPBType::SINT64:
|
||||
case GPBType::INT64:
|
||||
GPBUtil::checkInt64($value);
|
||||
break;
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::UINT64:
|
||||
GPBUtil::checkUint64($value);
|
||||
break;
|
||||
case GPBType::FLOAT:
|
||||
GPBUtil::checkFloat($value);
|
||||
break;
|
||||
case GPBType::DOUBLE:
|
||||
GPBUtil::checkDouble($value);
|
||||
break;
|
||||
case GPBType::BOOL:
|
||||
GPBUtil::checkBool($value);
|
||||
break;
|
||||
case GPBType::STRING:
|
||||
GPBUtil::checkString($value, true);
|
||||
break;
|
||||
case GPBType::MESSAGE:
|
||||
if (is_null($value)) {
|
||||
trigger_error("Map element cannot be null.", E_USER_ERROR);
|
||||
}
|
||||
GPBUtil::checkMessage($value, $this->klass);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$this->container[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the element at the given key.
|
||||
*
|
||||
* This will also be called for: unset($arr)
|
||||
*
|
||||
* @param int|string $key The key of the element to be removed.
|
||||
* @return void
|
||||
* @throws \ErrorException Invalid type for key.
|
||||
* @todo need to add return type void (require update php version to 7.1)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
$this->checkKey($this->key_type, $key);
|
||||
unset($this->container[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the existence of the element at the given key.
|
||||
*
|
||||
* This will also be called for: isset($arr)
|
||||
*
|
||||
* @param int|string $key The key of the element to be removed.
|
||||
* @return bool True if the element at the given key exists.
|
||||
* @throws \ErrorException Invalid type for key.
|
||||
*/
|
||||
public function offsetExists($key): bool
|
||||
{
|
||||
$this->checkKey($this->key_type, $key);
|
||||
return isset($this->container[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
return new MapFieldIter($this->container, $this->key_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of stored elements.
|
||||
*
|
||||
* This will also be called for: count($arr)
|
||||
*
|
||||
* @return integer The number of stored elements.
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return count($this->container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private function checkKey($key_type, &$key)
|
||||
{
|
||||
switch ($key_type) {
|
||||
case GPBType::SFIXED32:
|
||||
case GPBType::SINT32:
|
||||
case GPBType::INT32:
|
||||
GPBUtil::checkInt32($key);
|
||||
break;
|
||||
case GPBType::FIXED32:
|
||||
case GPBType::UINT32:
|
||||
GPBUtil::checkUint32($key);
|
||||
break;
|
||||
case GPBType::SFIXED64:
|
||||
case GPBType::SINT64:
|
||||
case GPBType::INT64:
|
||||
GPBUtil::checkInt64($key);
|
||||
break;
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::UINT64:
|
||||
GPBUtil::checkUint64($key);
|
||||
break;
|
||||
case GPBType::BOOL:
|
||||
GPBUtil::checkBool($key);
|
||||
break;
|
||||
case GPBType::STRING:
|
||||
GPBUtil::checkString($key, true);
|
||||
break;
|
||||
default:
|
||||
trigger_error(
|
||||
"Given type cannot be map key.",
|
||||
E_USER_ERROR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
123
vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
vendored
Normal file
123
vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
/**
|
||||
* MapField and MapFieldIter are used by generated protocol message classes to
|
||||
* manipulate map fields.
|
||||
*/
|
||||
|
||||
namespace Google\Protobuf\Internal;
|
||||
|
||||
/**
|
||||
* MapFieldIter is used to iterate MapField. It is also need for the foreach
|
||||
* syntax.
|
||||
*/
|
||||
class MapFieldIter implements \Iterator
|
||||
{
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private $key_type;
|
||||
|
||||
/**
|
||||
* Create iterator instance for MapField.
|
||||
*
|
||||
* @param array $container
|
||||
* @param GPBType $key_type Map key type.
|
||||
* @ignore
|
||||
*/
|
||||
public function __construct($container, $key_type)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->key_type = $key_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the status of the iterator
|
||||
*
|
||||
* @return void
|
||||
* @todo need to add return type void (require update php version to 7.1)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
reset($this->container);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the element at the current position.
|
||||
*
|
||||
* @return object The element at the current position.
|
||||
* @todo need to add return type mixed (require update php version to 8.0)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return current($this->container);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current key.
|
||||
*
|
||||
* @return object The current key.
|
||||
* @todo need to add return type mixed (require update php version to 8.0)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
$key = key($this->container);
|
||||
switch ($this->key_type) {
|
||||
case GPBType::INT64:
|
||||
case GPBType::UINT64:
|
||||
case GPBType::FIXED64:
|
||||
case GPBType::SFIXED64:
|
||||
case GPBType::SINT64:
|
||||
if (PHP_INT_SIZE === 8) {
|
||||
return $key;
|
||||
}
|
||||
// Intentionally fall through
|
||||
case GPBType::STRING:
|
||||
// PHP associative array stores int string as int for key.
|
||||
return strval($key);
|
||||
case GPBType::BOOL:
|
||||
// PHP associative array stores bool as integer for key.
|
||||
return boolval($key);
|
||||
default:
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Move to the next position.
|
||||
*
|
||||
* @return void
|
||||
* @todo need to add return type void (require update php version to 7.1)
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
next($this->container);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether there are more elements to iterate.
|
||||
*
|
||||
* @return bool True if there are more elements to iterate.
|
||||
*/
|
||||
public function valid(): bool
|
||||
{
|
||||
return key($this->container) !== null;
|
||||
}
|
||||
}
|
||||
2108
vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
vendored
Normal file
2108
vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user