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

/**
 * "Slice" of a file starting at line_offset -- a line offset and code fragment corresponding to the worker's stack.
 *
 * Generated from protobuf message <code>temporal.api.sdk.v1.StackTraceFileSlice</code>
 */
class StackTraceFileSlice extends \Google\Protobuf\Internal\Message
{
    /**
     * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike
     * the `line` property of a `StackTraceFileLocation`.
     * (-- api-linter: core::0141::forbidden-types=disabled
     *     aip.dev/not-precedent: These really shouldn't have negative values. --)
     *
     * Generated from protobuf field <code>uint32 line_offset = 1;</code>
     */
    protected $line_offset = 0;
    /**
     * Slice of a file with the respective OS-specific line terminator.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     */
    protected $content = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $line_offset
     *           Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike
     *           the `line` property of a `StackTraceFileLocation`.
     *           (-- api-linter: core::0141::forbidden-types=disabled
     *               aip.dev/not-precedent: These really shouldn't have negative values. --)
     *     @type string $content
     *           Slice of a file with the respective OS-specific line terminator.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce();
        parent::__construct($data);
    }

    /**
     * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike
     * the `line` property of a `StackTraceFileLocation`.
     * (-- api-linter: core::0141::forbidden-types=disabled
     *     aip.dev/not-precedent: These really shouldn't have negative values. --)
     *
     * Generated from protobuf field <code>uint32 line_offset = 1;</code>
     * @return int
     */
    public function getLineOffset()
    {
        return $this->line_offset;
    }

    /**
     * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike
     * the `line` property of a `StackTraceFileLocation`.
     * (-- api-linter: core::0141::forbidden-types=disabled
     *     aip.dev/not-precedent: These really shouldn't have negative values. --)
     *
     * Generated from protobuf field <code>uint32 line_offset = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setLineOffset($var)
    {
        GPBUtil::checkUint32($var);
        $this->line_offset = $var;

        return $this;
    }

    /**
     * Slice of a file with the respective OS-specific line terminator.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Slice of a file with the respective OS-specific line terminator.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkString($var, True);
        $this->content = $var;

        return $this;
    }

}

