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

namespace Google\Cloud\Debugger\V2;

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

/**
 * Represents a stack frame context.
 *
 * Generated from protobuf message <code>google.devtools.clouddebugger.v2.StackFrame</code>
 */
class StackFrame extends \Google\Protobuf\Internal\Message
{
    /**
     * Demangled function name at the call site.
     *
     * Generated from protobuf field <code>string function = 1;</code>
     */
    private $function = '';
    /**
     * Source location of the call site.
     *
     * Generated from protobuf field <code>.google.devtools.clouddebugger.v2.SourceLocation location = 2;</code>
     */
    private $location = null;
    /**
     * Set of arguments passed to this function.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable arguments = 3;</code>
     */
    private $arguments;
    /**
     * Set of local variables at the stack frame location.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable locals = 4;</code>
     */
    private $locals;

    public function __construct() {
        \GPBMetadata\Google\Devtools\Clouddebugger\V2\Data::initOnce();
        parent::__construct();
    }

    /**
     * Demangled function name at the call site.
     *
     * Generated from protobuf field <code>string function = 1;</code>
     * @return string
     */
    public function getFunction()
    {
        return $this->function;
    }

    /**
     * Demangled function name at the call site.
     *
     * Generated from protobuf field <code>string function = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFunction($var)
    {
        GPBUtil::checkString($var, True);
        $this->function = $var;

        return $this;
    }

    /**
     * Source location of the call site.
     *
     * Generated from protobuf field <code>.google.devtools.clouddebugger.v2.SourceLocation location = 2;</code>
     * @return \Google\Cloud\Debugger\V2\SourceLocation
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Source location of the call site.
     *
     * Generated from protobuf field <code>.google.devtools.clouddebugger.v2.SourceLocation location = 2;</code>
     * @param \Google\Cloud\Debugger\V2\SourceLocation $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Debugger\V2\SourceLocation::class);
        $this->location = $var;

        return $this;
    }

    /**
     * Set of arguments passed to this function.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable arguments = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getArguments()
    {
        return $this->arguments;
    }

    /**
     * Set of arguments passed to this function.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable arguments = 3;</code>
     * @param \Google\Cloud\Debugger\V2\Variable[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setArguments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Debugger\V2\Variable::class);
        $this->arguments = $arr;

        return $this;
    }

    /**
     * Set of local variables at the stack frame location.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable locals = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLocals()
    {
        return $this->locals;
    }

    /**
     * Set of local variables at the stack frame location.
     * Note that this might not be populated for all stack frames.
     *
     * Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable locals = 4;</code>
     * @param \Google\Cloud\Debugger\V2\Variable[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocals($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Debugger\V2\Variable::class);
        $this->locals = $arr;

        return $this;
    }

}

