<?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;

/**
 * Collection of FileLocation messages from a single stack.
 *
 * Generated from protobuf message <code>temporal.api.sdk.v1.StackTrace</code>
 */
class StackTrace extends \Google\Protobuf\Internal\Message
{
    /**
     * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace.
     *
     * Generated from protobuf field <code>repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1;</code>
     */
    private $locations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Sdk\V1\StackTraceFileLocation[] $locations
     *           Collection of `FileLocation`s, each for a stack frame that comprise a stack trace.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce();
        parent::__construct($data);
    }

    /**
     * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace.
     *
     * Generated from protobuf field <code>repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1;</code>
     * @return RepeatedField<\Temporal\Api\Sdk\V1\StackTraceFileLocation>
     */
    public function getLocations()
    {
        return $this->locations;
    }

    /**
     * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace.
     *
     * Generated from protobuf field <code>repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1;</code>
     * @param \Temporal\Api\Sdk\V1\StackTraceFileLocation[] $var
     * @return $this
     */
    public function setLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\StackTraceFileLocation::class);
        $this->locations = $arr;

        return $this;
    }

}

