• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/protobuf/sender.php
  • Класс: BitrixPullProtobufSender
  • Вызов: Sender::descriptor
static function descriptor()
    {
        return googleprotobufDescriptorProto::fromArray([
            'name'      => 'Sender',
            'field'     => [
                googleprotobufFieldDescriptorProto::fromArray([
                    'number' => 1,
                    'name' => 'type',
                    'type' => googleprotobufFieldDescriptorProtoType::TYPE_ENUM(),
                    'label' => googleprotobufFieldDescriptorProtoLabel::LABEL_OPTIONAL(),
                    'type_name' => '.SenderType'
                ]),
                googleprotobufFieldDescriptorProto::fromArray([
                    'number' => 2,
                    'name' => 'id',
                    'type' => googleprotobufFieldDescriptorProtoType::TYPE_BYTES(),
                    'label' => googleprotobufFieldDescriptorProtoLabel::LABEL_OPTIONAL()
                ]),
            ],
        ]);
    }