<reponame>MrE-Fog/coremltools<filename>deps/protobuf/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php<gh_stars>0<?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;

/**
 * Protobuf type <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
 */
class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
{
    /**
     * <pre>
     * Identifies the element in the original source .proto file. This field
     * is formatted the same as SourceCodeInfo.Location.path.
     * </pre>
     *
     * <code>repeated int32 path = 1 [packed = true];</code>
     */
    private $path;
    private $has_path = false;
    /**
     * <pre>
     * Identifies the filesystem path to the original source .proto.
     * </pre>
     *
     * <code>optional string source_file = 2;</code>
     */
    private $source_file = '';
    private $has_source_file = false;
    /**
     * <pre>
     * Identifies the starting offset in bytes in the generated code
     * that relates to the identified object.
     * </pre>
     *
     * <code>optional int32 begin = 3;</code>
     */
    private $begin = 0;
    private $has_begin = false;
    /**
     * <pre>
     * Identifies the ending offset in bytes in the generated code that
     * relates to the identified offset. The end offset should be one past
     * the last relevant byte (so the length of the text = end - begin).
     * </pre>
     *
     * <code>optional int32 end = 4;</code>
     */
    private $end = 0;
    private $has_end = false;

    public function __construct() {
        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
        parent::__construct();
    }

    /**
     * <pre>
     * Identifies the element in the original source .proto file. This field
     * is formatted the same as SourceCodeInfo.Location.path.
     * </pre>
     *
     * <code>repeated int32 path = 1 [packed = true];</code>
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * <pre>
     * Identifies the element in the original source .proto file. This field
     * is formatted the same as SourceCodeInfo.Location.path.
     * </pre>
     *
     * <code>repeated int32 path = 1 [packed = true];</code>
     */
    public function setPath(&$var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->path = $arr;
        $this->has_path = true;
    }

    public function hasPath()
    {
        return $this->has_path;
    }

    /**
     * <pre>
     * Identifies the filesystem path to the original source .proto.
     * </pre>
     *
     * <code>optional string source_file = 2;</code>
     */
    public function getSourceFile()
    {
        return $this->source_file;
    }

    /**
     * <pre>
     * Identifies the filesystem path to the original source .proto.
     * </pre>
     *
     * <code>optional string source_file = 2;</code>
     */
    public function setSourceFile($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_file = $var;
        $this->has_source_file = true;
    }

    public function hasSourceFile()
    {
        return $this->has_source_file;
    }

    /**
     * <pre>
     * Identifies the starting offset in bytes in the generated code
     * that relates to the identified object.
     * </pre>
     *
     * <code>optional int32 begin = 3;</code>
     */
    public function getBegin()
    {
        return $this->begin;
    }

    /**
     * <pre>
     * Identifies the starting offset in bytes in the generated code
     * that relates to the identified object.
     * </pre>
     *
     * <code>optional int32 begin = 3;</code>
     */
    public function setBegin($var)
    {
        GPBUtil::checkInt32($var);
        $this->begin = $var;
        $this->has_begin = true;
    }

    public function hasBegin()
    {
        return $this->has_begin;
    }

    /**
     * <pre>
     * Identifies the ending offset in bytes in the generated code that
     * relates to the identified offset. The end offset should be one past
     * the last relevant byte (so the length of the text = end - begin).
     * </pre>
     *
     * <code>optional int32 end = 4;</code>
     */
    public function getEnd()
    {
        return $this->end;
    }

    /**
     * <pre>
     * Identifies the ending offset in bytes in the generated code that
     * relates to the identified offset. The end offset should be one past
     * the last relevant byte (so the length of the text = end - begin).
     * </pre>
     *
     * <code>optional int32 end = 4;</code>
     */
    public function setEnd($var)
    {
        GPBUtil::checkInt32($var);
        $this->end = $var;
        $this->has_end = true;
    }

    public function hasEnd()
    {
        return $this->has_end;
    }

}

