OneofOptions.php 2.41 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
<?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;

/**
14
 * Generated from protobuf message <code>google.protobuf.OneofOptions</code>
15 16 17 18 19 20
 */
class OneofOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * The parser stores options it doesn't recognize here. See above.
     *
21
     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
22 23 24 25
     */
    private $uninterpreted_option;
    private $has_uninterpreted_option = false;

26 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\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
     *           The parser stores options it doesn't recognize here. See above.
     * }
     */
    public function __construct($data = NULL) {
37
        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
38
        parent::__construct($data);
39 40 41 42 43
    }

    /**
     * The parser stores options it doesn't recognize here. See above.
     *
44 45
     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
46 47 48 49 50 51 52 53 54
     */
    public function getUninterpretedOption()
    {
        return $this->uninterpreted_option;
    }

    /**
     * The parser stores options it doesn't recognize here. See above.
     *
55 56 57
     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
     * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
58
     */
59
    public function setUninterpretedOption($var)
60
    {
61 62
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
        $this->uninterpreted_option = $arr;
63
        $this->has_uninterpreted_option = true;
64 65

        return $this;
66 67 68 69 70 71 72 73 74
    }

    public function hasUninterpretedOption()
    {
        return $this->has_uninterpreted_option;
    }

}