FileDescriptorSet.php 2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/protobuf/descriptor.proto

namespace Google\Protobuf\Internal;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The protocol compiler can output a FileDescriptorSet containing the .proto
 * files it parses.
 *
17
 * Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
18
 */
19
class FileDescriptorSet extends \Google\Protobuf\Internal\Message
20 21
{
    /**
22
     * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
23 24 25 26
     */
    private $file;
    private $has_file = false;

27 28 29 30 31 32 33 34 35 36
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Internal\FileDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $file
     * }
     */
    public function __construct($data = NULL) {
37
        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
38
        parent::__construct($data);
39 40 41
    }

    /**
42 43
     * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
44 45 46 47 48 49 50
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
51 52 53
     * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
     * @param \Google\Protobuf\Internal\FileDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
54
     */
55
    public function setFile($var)
56
    {
57 58
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
        $this->file = $arr;
59
        $this->has_file = true;
60 61

        return $this;
62 63 64 65 66 67 68 69 70
    }

    public function hasFile()
    {
        return $this->has_file;
    }

}