"Fossies" - the Fresh Open Source Software Archive

Member "protobuf-3.21.1/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php" (27 May 2022, 6602 Bytes) of package /linux/misc/protobuf-all-3.21.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Annotation.php" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.20.1_vs_3.21.0.

    1 <?php
    2 # Generated by the protocol buffer compiler.  DO NOT EDIT!
    3 # source: google/protobuf/descriptor.proto
    4 
    5 namespace Google\Protobuf\Internal\GeneratedCodeInfo;
    6 
    7 use Google\Protobuf\Internal\GPBType;
    8 use Google\Protobuf\Internal\GPBWire;
    9 use Google\Protobuf\Internal\RepeatedField;
   10 use Google\Protobuf\Internal\InputStream;
   11 use Google\Protobuf\Internal\GPBUtil;
   12 
   13 /**
   14  * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
   15  */
   16 class Annotation extends \Google\Protobuf\Internal\Message
   17 {
   18     /**
   19      * Identifies the element in the original source .proto file. This field
   20      * is formatted the same as SourceCodeInfo.Location.path.
   21      *
   22      * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
   23      */
   24     private $path;
   25     /**
   26      * Identifies the filesystem path to the original source .proto.
   27      *
   28      * Generated from protobuf field <code>optional string source_file = 2;</code>
   29      */
   30     protected $source_file = null;
   31     /**
   32      * Identifies the starting offset in bytes in the generated code
   33      * that relates to the identified object.
   34      *
   35      * Generated from protobuf field <code>optional int32 begin = 3;</code>
   36      */
   37     protected $begin = null;
   38     /**
   39      * Identifies the ending offset in bytes in the generated code that
   40      * relates to the identified offset. The end offset should be one past
   41      * the last relevant byte (so the length of the text = end - begin).
   42      *
   43      * Generated from protobuf field <code>optional int32 end = 4;</code>
   44      */
   45     protected $end = null;
   46 
   47     /**
   48      * Constructor.
   49      *
   50      * @param array $data {
   51      *     Optional. Data for populating the Message object.
   52      *
   53      *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $path
   54      *           Identifies the element in the original source .proto file. This field
   55      *           is formatted the same as SourceCodeInfo.Location.path.
   56      *     @type string $source_file
   57      *           Identifies the filesystem path to the original source .proto.
   58      *     @type int $begin
   59      *           Identifies the starting offset in bytes in the generated code
   60      *           that relates to the identified object.
   61      *     @type int $end
   62      *           Identifies the ending offset in bytes in the generated code that
   63      *           relates to the identified offset. The end offset should be one past
   64      *           the last relevant byte (so the length of the text = end - begin).
   65      * }
   66      */
   67     public function __construct($data = NULL) {
   68         \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
   69         parent::__construct($data);
   70     }
   71 
   72     /**
   73      * Identifies the element in the original source .proto file. This field
   74      * is formatted the same as SourceCodeInfo.Location.path.
   75      *
   76      * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
   77      * @return \Google\Protobuf\Internal\RepeatedField
   78      */
   79     public function getPath()
   80     {
   81         return $this->path;
   82     }
   83 
   84     /**
   85      * Identifies the element in the original source .proto file. This field
   86      * is formatted the same as SourceCodeInfo.Location.path.
   87      *
   88      * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
   89      * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
   90      * @return $this
   91      */
   92     public function setPath($var)
   93     {
   94         $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
   95         $this->path = $arr;
   96 
   97         return $this;
   98     }
   99 
  100     /**
  101      * Identifies the filesystem path to the original source .proto.
  102      *
  103      * Generated from protobuf field <code>optional string source_file = 2;</code>
  104      * @return string
  105      */
  106     public function getSourceFile()
  107     {
  108         return isset($this->source_file) ? $this->source_file : '';
  109     }
  110 
  111     public function hasSourceFile()
  112     {
  113         return isset($this->source_file);
  114     }
  115 
  116     public function clearSourceFile()
  117     {
  118         unset($this->source_file);
  119     }
  120 
  121     /**
  122      * Identifies the filesystem path to the original source .proto.
  123      *
  124      * Generated from protobuf field <code>optional string source_file = 2;</code>
  125      * @param string $var
  126      * @return $this
  127      */
  128     public function setSourceFile($var)
  129     {
  130         GPBUtil::checkString($var, True);
  131         $this->source_file = $var;
  132 
  133         return $this;
  134     }
  135 
  136     /**
  137      * Identifies the starting offset in bytes in the generated code
  138      * that relates to the identified object.
  139      *
  140      * Generated from protobuf field <code>optional int32 begin = 3;</code>
  141      * @return int
  142      */
  143     public function getBegin()
  144     {
  145         return isset($this->begin) ? $this->begin : 0;
  146     }
  147 
  148     public function hasBegin()
  149     {
  150         return isset($this->begin);
  151     }
  152 
  153     public function clearBegin()
  154     {
  155         unset($this->begin);
  156     }
  157 
  158     /**
  159      * Identifies the starting offset in bytes in the generated code
  160      * that relates to the identified object.
  161      *
  162      * Generated from protobuf field <code>optional int32 begin = 3;</code>
  163      * @param int $var
  164      * @return $this
  165      */
  166     public function setBegin($var)
  167     {
  168         GPBUtil::checkInt32($var);
  169         $this->begin = $var;
  170 
  171         return $this;
  172     }
  173 
  174     /**
  175      * Identifies the ending offset in bytes in the generated code that
  176      * relates to the identified offset. The end offset should be one past
  177      * the last relevant byte (so the length of the text = end - begin).
  178      *
  179      * Generated from protobuf field <code>optional int32 end = 4;</code>
  180      * @return int
  181      */
  182     public function getEnd()
  183     {
  184         return isset($this->end) ? $this->end : 0;
  185     }
  186 
  187     public function hasEnd()
  188     {
  189         return isset($this->end);
  190     }
  191 
  192     public function clearEnd()
  193     {
  194         unset($this->end);
  195     }
  196 
  197     /**
  198      * Identifies the ending offset in bytes in the generated code that
  199      * relates to the identified offset. The end offset should be one past
  200      * the last relevant byte (so the length of the text = end - begin).
  201      *
  202      * Generated from protobuf field <code>optional int32 end = 4;</code>
  203      * @param int $var
  204      * @return $this
  205      */
  206     public function setEnd($var)
  207     {
  208         GPBUtil::checkInt32($var);
  209         $this->end = $var;
  210 
  211         return $this;
  212     }
  213 
  214 }
  215 
  216 // Adding a class alias for backwards compatibility with the previous class name.
  217 class_alias(Annotation::class, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
  218