<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/profiles/v1development/profiles.proto

namespace Opentelemetry\Proto\Profiles\V1development;

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

/**
 * Describes a function, including its human-readable name, system name,
 * source file, and starting line number in the source.
 *
 * Generated from protobuf message <code>opentelemetry.proto.profiles.v1development.Function</code>
 */
class PBFunction extends \Google\Protobuf\Internal\Message
{
    /**
     * Function name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 name_strindex = 1;</code>
     */
    protected $name_strindex = 0;
    /**
     * Function name, as identified by the system. For instance,
     * it can be a C++ mangled name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 system_name_strindex = 2;</code>
     */
    protected $system_name_strindex = 0;
    /**
     * Source file containing the function. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 filename_strindex = 3;</code>
     */
    protected $filename_strindex = 0;
    /**
     * Line number in source file. 0 means unset.
     *
     * Generated from protobuf field <code>int64 start_line = 4;</code>
     */
    protected $start_line = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $name_strindex
     *           Function name. Empty string if not available.
     *     @type int $system_name_strindex
     *           Function name, as identified by the system. For instance,
     *           it can be a C++ mangled name. Empty string if not available.
     *     @type int $filename_strindex
     *           Source file containing the function. Empty string if not available.
     *     @type int|string $start_line
     *           Line number in source file. 0 means unset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Profiles\V1Development\Profiles::initOnce();
        parent::__construct($data);
    }

    /**
     * Function name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 name_strindex = 1;</code>
     * @return int
     */
    public function getNameStrindex()
    {
        return $this->name_strindex;
    }

    /**
     * Function name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 name_strindex = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setNameStrindex($var)
    {
        GPBUtil::checkInt32($var);
        $this->name_strindex = $var;

        return $this;
    }

    /**
     * Function name, as identified by the system. For instance,
     * it can be a C++ mangled name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 system_name_strindex = 2;</code>
     * @return int
     */
    public function getSystemNameStrindex()
    {
        return $this->system_name_strindex;
    }

    /**
     * Function name, as identified by the system. For instance,
     * it can be a C++ mangled name. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 system_name_strindex = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSystemNameStrindex($var)
    {
        GPBUtil::checkInt32($var);
        $this->system_name_strindex = $var;

        return $this;
    }

    /**
     * Source file containing the function. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 filename_strindex = 3;</code>
     * @return int
     */
    public function getFilenameStrindex()
    {
        return $this->filename_strindex;
    }

    /**
     * Source file containing the function. Empty string if not available.
     *
     * Generated from protobuf field <code>int32 filename_strindex = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setFilenameStrindex($var)
    {
        GPBUtil::checkInt32($var);
        $this->filename_strindex = $var;

        return $this;
    }

    /**
     * Line number in source file. 0 means unset.
     *
     * Generated from protobuf field <code>int64 start_line = 4;</code>
     * @return int|string
     */
    public function getStartLine()
    {
        return $this->start_line;
    }

    /**
     * Line number in source file. 0 means unset.
     *
     * Generated from protobuf field <code>int64 start_line = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartLine($var)
    {
        GPBUtil::checkInt64($var);
        $this->start_line = $var;

        return $this;
    }

}

