<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/sdk/v1/enhanced_stack_trace.proto

namespace Temporal\Api\Sdk\V1;

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

/**
 * More specific location details of a file: its path, precise line and column numbers if applicable, and function name if available.
 * In essence, a pointer to a location in a file
 *
 * Generated from protobuf message <code>temporal.api.sdk.v1.StackTraceFileLocation</code>
 */
class StackTraceFileLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * Path to source file (absolute or relative).
     * If the paths are relative, ensure that they are all relative to the same root.
     *
     * Generated from protobuf field <code>string file_path = 1;</code>
     */
    protected $file_path = '';
    /**
     * Optional; If possible, SDK should send this -- this is required for displaying the code location.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 line = 2;</code>
     */
    protected $line = 0;
    /**
     * Optional; if possible, SDK should send this.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 column = 3;</code>
     */
    protected $column = 0;
    /**
     * Function name this line belongs to, if applicable.
     * Used for falling back to stack trace view.
     *
     * Generated from protobuf field <code>string function_name = 4;</code>
     */
    protected $function_name = '';
    /**
     * Flag to communicate whether a location should be hidden by default in the stack view.
     *
     * Generated from protobuf field <code>bool internal_code = 5;</code>
     */
    protected $internal_code = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $file_path
     *           Path to source file (absolute or relative).
     *           If the paths are relative, ensure that they are all relative to the same root.
     *     @type int $line
     *           Optional; If possible, SDK should send this -- this is required for displaying the code location.
     *           If not provided, set to -1.
     *     @type int $column
     *           Optional; if possible, SDK should send this.
     *           If not provided, set to -1.
     *     @type string $function_name
     *           Function name this line belongs to, if applicable.
     *           Used for falling back to stack trace view.
     *     @type bool $internal_code
     *           Flag to communicate whether a location should be hidden by default in the stack view.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce();
        parent::__construct($data);
    }

    /**
     * Path to source file (absolute or relative).
     * If the paths are relative, ensure that they are all relative to the same root.
     *
     * Generated from protobuf field <code>string file_path = 1;</code>
     * @return string
     */
    public function getFilePath()
    {
        return $this->file_path;
    }

    /**
     * Path to source file (absolute or relative).
     * If the paths are relative, ensure that they are all relative to the same root.
     *
     * Generated from protobuf field <code>string file_path = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFilePath($var)
    {
        GPBUtil::checkString($var, True);
        $this->file_path = $var;

        return $this;
    }

    /**
     * Optional; If possible, SDK should send this -- this is required for displaying the code location.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 line = 2;</code>
     * @return int
     */
    public function getLine()
    {
        return $this->line;
    }

    /**
     * Optional; If possible, SDK should send this -- this is required for displaying the code location.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 line = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setLine($var)
    {
        GPBUtil::checkInt32($var);
        $this->line = $var;

        return $this;
    }

    /**
     * Optional; if possible, SDK should send this.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 column = 3;</code>
     * @return int
     */
    public function getColumn()
    {
        return $this->column;
    }

    /**
     * Optional; if possible, SDK should send this.
     * If not provided, set to -1.
     *
     * Generated from protobuf field <code>int32 column = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setColumn($var)
    {
        GPBUtil::checkInt32($var);
        $this->column = $var;

        return $this;
    }

    /**
     * Function name this line belongs to, if applicable.
     * Used for falling back to stack trace view.
     *
     * Generated from protobuf field <code>string function_name = 4;</code>
     * @return string
     */
    public function getFunctionName()
    {
        return $this->function_name;
    }

    /**
     * Function name this line belongs to, if applicable.
     * Used for falling back to stack trace view.
     *
     * Generated from protobuf field <code>string function_name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setFunctionName($var)
    {
        GPBUtil::checkString($var, True);
        $this->function_name = $var;

        return $this;
    }

    /**
     * Flag to communicate whether a location should be hidden by default in the stack view.
     *
     * Generated from protobuf field <code>bool internal_code = 5;</code>
     * @return bool
     */
    public function getInternalCode()
    {
        return $this->internal_code;
    }

    /**
     * Flag to communicate whether a location should be hidden by default in the stack view.
     *
     * Generated from protobuf field <code>bool internal_code = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setInternalCode($var)
    {
        GPBUtil::checkBool($var);
        $this->internal_code = $var;

        return $this;
    }

}

