本文整理汇总了PHP中Google\Protobuf\DescriptorProto类的典型用法代码示例。如果您正苦于以下问题:PHP DescriptorProto类的具体用法?PHP DescriptorProto怎么用?PHP DescriptorProto使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DescriptorProto类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupFullNameForMessage
protected function setupFullNameForMessage(DescriptorProto $message, $package_name = "")
{
$new_package_name = $package_name . "." . $message->getName();
foreach ($message->getEnumType() as $enum) {
$this->setupFullNameForEnum($enum, $new_package_name);
}
foreach ($message->getNestedType() as $m) {
$this->setupFullNameForMessage($m, $new_package_name);
}
$message->full_name = $package_name . "." . $message->getName();
$message->package_name = $package_name;
MessagePool::register($message->full_name, $message);
if (MyHelper::IsPackageNameOverriden($this->file)) {
foreach ($message->getField() as $field) {
/** @var $field FieldDescriptorProto */
if ($field->getType() == \ProtocolBuffers::TYPE_MESSAGE || $field->getType() == \ProtocolBuffers::TYPE_ENUM) {
$name = $field->getTypeName();
$package = $this->file->getPackage();
if ($package) {
$name = str_replace($package, MyHelper::getPackageName($this->file), $name);
} else {
$name = MyHelper::getPackageName($this->file) . $name;
}
$name = preg_replace("/^\\.+/", ".", $name);
$field->setTypeName($name);
}
}
}
}
示例2: generateMessage
private function generateMessage($className, DescriptorProto $message)
{
$file = new PhpFile();
$class = $file->addClass($className);
$ns = $class->getNamespace();
$ns->addUse("Skrz\\Meta\\Protobuf\\ProtobufField", null, $protobufFieldAlias);
if (($info = $this->getSourceCodeInfo($className)) && $info->getLeadingComments()) {
$class->addComment(trim($info->getLeadingComments()));
}
$this->addAutoGeneratedWarning($class);
foreach ((array) $message->getField() as $i => $field) {
/** @var FieldDescriptorProto $field */
$propertyName = lcfirst(implode("", array_map(function ($s) {
return ucfirst($s);
}, explode("_", $field->getName()))));
$property = $class->addProperty($propertyName);
$property->setVisibility("protected");
if (($info = $this->getSourceCodeInfo($className, array_merge($this->paths[$className], [DescriptorProtoMeta::FIELD_PROTOBUF_FIELD, $i]))) && $info->getLeadingComments()) {
$property->addComment(str_replace("*/", "* /", trim($info->getLeadingComments())));
$property->addComment("");
}
switch ($field->getType()) {
case FieldDescriptorProto\TypeEnum::TYPE_DOUBLE:
$wireType = WireTypeEnum::FIXED64;
$phpType = "float";
break;
case FieldDescriptorProto\TypeEnum::TYPE_FLOAT:
$wireType = WireTypeEnum::FIXED32;
$phpType = "float";
break;
case FieldDescriptorProto\TypeEnum::TYPE_UINT64:
case FieldDescriptorProto\TypeEnum::TYPE_UINT32:
$unsigned = true;
case FieldDescriptorProto\TypeEnum::TYPE_INT64:
case FieldDescriptorProto\TypeEnum::TYPE_INT32:
$wireType = WireTypeEnum::VARINT;
$phpType = "int";
break;
case FieldDescriptorProto\TypeEnum::TYPE_FIXED64:
$unsigned = true;
case FieldDescriptorProto\TypeEnum::TYPE_SFIXED64:
$wireType = WireTypeEnum::FIXED64;
$phpType = "int";
break;
case FieldDescriptorProto\TypeEnum::TYPE_FIXED32:
$unsigned = true;
case FieldDescriptorProto\TypeEnum::TYPE_SFIXED32:
$wireType = WireTypeEnum::FIXED32;
$phpType = "int";
break;
case FieldDescriptorProto\TypeEnum::TYPE_BOOL:
$wireType = WireTypeEnum::VARINT;
$phpType = "bool";
break;
case FieldDescriptorProto\TypeEnum::TYPE_STRING:
case FieldDescriptorProto\TypeEnum::TYPE_BYTES:
$wireType = WireTypeEnum::STRING;
$phpType = "string";
break;
case FieldDescriptorProto\TypeEnum::TYPE_MESSAGE:
$wireType = WireTypeEnum::STRING;
$fieldClassName = $this->convertPackageToNamespace($field->getTypeName());
$ns->addUse($fieldClassName, null, $phpType);
break;
case FieldDescriptorProto\TypeEnum::TYPE_ENUM:
$wireType = WireTypeEnum::VARINT;
$fieldClassName = $this->convertPackageToNamespace($field->getTypeName() . "Enum");
$ns->addUse($fieldClassName, null, $see);
$phpType = "int";
break;
case FieldDescriptorProto\TypeEnum::TYPE_SINT32:
case FieldDescriptorProto\TypeEnum::TYPE_SINT64:
$wireType = WireTypeEnum::ZIGZAG;
$phpType = "int";
break;
default:
throw new \LogicException("Unhandled type '{$field->getType()}'.");
}
if ($field->getLabel() === FieldDescriptorProto\LabelEnum::LABEL_REPEATED) {
$phpType .= "[]";
}
$property->addComment("@var {$phpType}");
if (isset($see)) {
$property->addComment("@see {$see}");
unset($see);
}
$property->addComment("")->addComment("@Skrz\\Meta\\Protobuf\\ProtobufField(" . "number={$field->getNumber()}" . ", wireType=\"{$wireType}\"" . ", unsigned=" . var_export(isset($unsigned) ? $unsigned : false, true) . ", packed=" . var_export($field->getOptions() ? $field->getOptions()->getPacked() : false, true) . ")");
$getter = $class->addMethod("get" . ucfirst($propertyName));
$getter->addComment("@return {$phpType}");
$getter->addBody("return \$this->{$propertyName};");
$setter = $class->addMethod("set" . ucfirst($propertyName));
$setter->addParameter($propertyName);
$setter->addComment("@param {$phpType} \${$propertyName}")->addComment("")->addComment("@return self");
$setter->addBody("\$this->{$propertyName} = \${$propertyName};")->addBody("return \$this;");
}
return new Result($file, $class);
}
示例3: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'BuyItemPokeCoinsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Platform.Responses.BuyItemPokeCoinsResponse.Status'])]]);
}
示例4: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'FortDetailsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'fort_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'team_color', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.TeamColor']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'pokemon_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PokemonData']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'image_urls', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'fp', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'max_stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Map.Fort.FortType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'latitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'longitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'description', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'modifiers', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Map.Fort.FortModifier'])]]);
}
示例5: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'SfidaActionLogResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.SfidaActionLogResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'log_entries', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Logs.ActionLogEntry'])]]);
}
示例6: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'CheckAwardedBadgesResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'success', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'awarded_badges', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.BadgeType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'awarded_badge_levels', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
}
示例7: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'SourceCodeInfo', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'location', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.SourceCodeInfo.Location'])]]);
}
示例8: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'BattleResults', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'gym_state', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Gym.GymState']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'attackers', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'player_experience_awarded', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'next_defender_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'gym_points_delta', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例9: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'ItemAward', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'item_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.Item.ItemId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'item_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例10: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'DailyBonus', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'next_collected_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'next_defender_bonus_collect_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例11: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'DescriptorProto', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'field', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.FieldDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'extension', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.FieldDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'nested_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'enum_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.EnumDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'extension_range', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto.ExtensionRange']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'oneof_decl', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.OneofDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'options', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.google.protobuf.MessageOptions']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'reserved_range', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto.ReservedRange']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'reserved_name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
}
示例12: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'BattleAttributes', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'sta_percent', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例13: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'RegisterBackgroundDeviceMessage', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'device_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'device_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例14: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'GymBattleSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'energy_per_sec', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'dodge_energy_cost', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'retarget_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'enemy_attack_interval', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'attack_server_interval', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'round_duration_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'bonus_time_per_ally_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'maximum_attackers_per_battle', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'same_type_attack_bonus_multiplier', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'maximum_energy', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'energy_delta_per_health_lost', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'dodge_duration_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'minimum_player_level', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 14, 'name' => 'swap_duration_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 15, 'name' => 'dodge_damage_reduction_percent', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
}
示例15: descriptor
/**
* {@inheritdoc}
*/
public static function descriptor()
{
return \google\protobuf\DescriptorProto::fromArray(['name' => 'InventoryUpgradeAttributes', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'additional_storage', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'upgrade_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.InventoryUpgradeType'])]]);
}