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