<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/cloudtrace/v2/trace.proto

namespace Google\Cloud\Trace\V2\StackTrace;

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

/**
 * Represents a single stack frame in a stack trace.
 *
 * Generated from protobuf message <code>google.devtools.cloudtrace.v2.StackTrace.StackFrame</code>
 */
class StackFrame extends \Google\Protobuf\Internal\Message
{
    /**
     * The fully-qualified name that uniquely identifies the function or
     * method that is active in this frame (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString function_name = 1;</code>
     */
    private $function_name = null;
    /**
     * An un-mangled function name, if `function_name` is
     * [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
     * be fully-qualified (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2;</code>
     */
    private $original_function_name = null;
    /**
     * The name of the source file where the function call appears (up to 256
     * bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString file_name = 3;</code>
     */
    private $file_name = null;
    /**
     * The line number in `file_name` where the function call appears.
     *
     * Generated from protobuf field <code>int64 line_number = 4;</code>
     */
    private $line_number = 0;
    /**
     * The column number where the function call appears, if available.
     * This is important in JavaScript because of its anonymous functions.
     *
     * Generated from protobuf field <code>int64 column_number = 5;</code>
     */
    private $column_number = 0;
    /**
     * The binary module from where the code was loaded.
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.Module load_module = 6;</code>
     */
    private $load_module = null;
    /**
     * The version of the deployed source code (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString source_version = 7;</code>
     */
    private $source_version = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Trace\V2\TruncatableString $function_name
     *           The fully-qualified name that uniquely identifies the function or
     *           method that is active in this frame (up to 1024 bytes).
     *     @type \Google\Cloud\Trace\V2\TruncatableString $original_function_name
     *           An un-mangled function name, if `function_name` is
     *           [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
     *           be fully-qualified (up to 1024 bytes).
     *     @type \Google\Cloud\Trace\V2\TruncatableString $file_name
     *           The name of the source file where the function call appears (up to 256
     *           bytes).
     *     @type int|string $line_number
     *           The line number in `file_name` where the function call appears.
     *     @type int|string $column_number
     *           The column number where the function call appears, if available.
     *           This is important in JavaScript because of its anonymous functions.
     *     @type \Google\Cloud\Trace\V2\Module $load_module
     *           The binary module from where the code was loaded.
     *     @type \Google\Cloud\Trace\V2\TruncatableString $source_version
     *           The version of the deployed source code (up to 128 bytes).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * The fully-qualified name that uniquely identifies the function or
     * method that is active in this frame (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString function_name = 1;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString
     */
    public function getFunctionName()
    {
        return $this->function_name;
    }

    /**
     * The fully-qualified name that uniquely identifies the function or
     * method that is active in this frame (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString function_name = 1;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setFunctionName($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->function_name = $var;

        return $this;
    }

    /**
     * An un-mangled function name, if `function_name` is
     * [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
     * be fully-qualified (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString
     */
    public function getOriginalFunctionName()
    {
        return $this->original_function_name;
    }

    /**
     * An un-mangled function name, if `function_name` is
     * [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
     * be fully-qualified (up to 1024 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setOriginalFunctionName($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->original_function_name = $var;

        return $this;
    }

    /**
     * The name of the source file where the function call appears (up to 256
     * bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString file_name = 3;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString
     */
    public function getFileName()
    {
        return $this->file_name;
    }

    /**
     * The name of the source file where the function call appears (up to 256
     * bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString file_name = 3;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setFileName($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->file_name = $var;

        return $this;
    }

    /**
     * The line number in `file_name` where the function call appears.
     *
     * Generated from protobuf field <code>int64 line_number = 4;</code>
     * @return int|string
     */
    public function getLineNumber()
    {
        return $this->line_number;
    }

    /**
     * The line number in `file_name` where the function call appears.
     *
     * Generated from protobuf field <code>int64 line_number = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLineNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->line_number = $var;

        return $this;
    }

    /**
     * The column number where the function call appears, if available.
     * This is important in JavaScript because of its anonymous functions.
     *
     * Generated from protobuf field <code>int64 column_number = 5;</code>
     * @return int|string
     */
    public function getColumnNumber()
    {
        return $this->column_number;
    }

    /**
     * The column number where the function call appears, if available.
     * This is important in JavaScript because of its anonymous functions.
     *
     * Generated from protobuf field <code>int64 column_number = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setColumnNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->column_number = $var;

        return $this;
    }

    /**
     * The binary module from where the code was loaded.
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.Module load_module = 6;</code>
     * @return \Google\Cloud\Trace\V2\Module
     */
    public function getLoadModule()
    {
        return $this->load_module;
    }

    /**
     * The binary module from where the code was loaded.
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.Module load_module = 6;</code>
     * @param \Google\Cloud\Trace\V2\Module $var
     * @return $this
     */
    public function setLoadModule($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Module::class);
        $this->load_module = $var;

        return $this;
    }

    /**
     * The version of the deployed source code (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString source_version = 7;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString
     */
    public function getSourceVersion()
    {
        return $this->source_version;
    }

    /**
     * The version of the deployed source code (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString source_version = 7;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setSourceVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->source_version = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StackFrame::class, \Google\Cloud\Trace\V2\StackTrace_StackFrame::class);

