<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/profiles/v1development/profiles.proto

namespace Opentelemetry\Proto\Profiles\V1development;

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

/**
 * Describes the mapping of a binary in memory, including its address range,
 * file offset, and metadata like build ID
 *
 * Generated from protobuf message <code>opentelemetry.proto.profiles.v1development.Mapping</code>
 */
class Mapping extends \Google\Protobuf\Internal\Message
{
    /**
     * Address at which the binary (or DLL) is loaded into memory.
     *
     * Generated from protobuf field <code>uint64 memory_start = 1;</code>
     */
    protected $memory_start = 0;
    /**
     * The limit of the address range occupied by this mapping.
     *
     * Generated from protobuf field <code>uint64 memory_limit = 2;</code>
     */
    protected $memory_limit = 0;
    /**
     * Offset in the binary that corresponds to the first mapped address.
     *
     * Generated from protobuf field <code>uint64 file_offset = 3;</code>
     */
    protected $file_offset = 0;
    /**
     * The object this entry is loaded from.  This can be a filename on
     * disk for the main binary and shared libraries, or virtual
     * abstractions like "[vdso]".
     *
     * Generated from protobuf field <code>int32 filename_strindex = 4;</code>
     */
    protected $filename_strindex = 0;
    /**
     * References to attributes in ProfilesDictionary.attribute_table. [optional]
     *
     * Generated from protobuf field <code>repeated int32 attribute_indices = 5;</code>
     */
    private $attribute_indices;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $memory_start
     *           Address at which the binary (or DLL) is loaded into memory.
     *     @type int|string $memory_limit
     *           The limit of the address range occupied by this mapping.
     *     @type int|string $file_offset
     *           Offset in the binary that corresponds to the first mapped address.
     *     @type int $filename_strindex
     *           The object this entry is loaded from.  This can be a filename on
     *           disk for the main binary and shared libraries, or virtual
     *           abstractions like "[vdso]".
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $attribute_indices
     *           References to attributes in ProfilesDictionary.attribute_table. [optional]
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Profiles\V1Development\Profiles::initOnce();
        parent::__construct($data);
    }

    /**
     * Address at which the binary (or DLL) is loaded into memory.
     *
     * Generated from protobuf field <code>uint64 memory_start = 1;</code>
     * @return int|string
     */
    public function getMemoryStart()
    {
        return $this->memory_start;
    }

    /**
     * Address at which the binary (or DLL) is loaded into memory.
     *
     * Generated from protobuf field <code>uint64 memory_start = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMemoryStart($var)
    {
        GPBUtil::checkUint64($var);
        $this->memory_start = $var;

        return $this;
    }

    /**
     * The limit of the address range occupied by this mapping.
     *
     * Generated from protobuf field <code>uint64 memory_limit = 2;</code>
     * @return int|string
     */
    public function getMemoryLimit()
    {
        return $this->memory_limit;
    }

    /**
     * The limit of the address range occupied by this mapping.
     *
     * Generated from protobuf field <code>uint64 memory_limit = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMemoryLimit($var)
    {
        GPBUtil::checkUint64($var);
        $this->memory_limit = $var;

        return $this;
    }

    /**
     * Offset in the binary that corresponds to the first mapped address.
     *
     * Generated from protobuf field <code>uint64 file_offset = 3;</code>
     * @return int|string
     */
    public function getFileOffset()
    {
        return $this->file_offset;
    }

    /**
     * Offset in the binary that corresponds to the first mapped address.
     *
     * Generated from protobuf field <code>uint64 file_offset = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFileOffset($var)
    {
        GPBUtil::checkUint64($var);
        $this->file_offset = $var;

        return $this;
    }

    /**
     * The object this entry is loaded from.  This can be a filename on
     * disk for the main binary and shared libraries, or virtual
     * abstractions like "[vdso]".
     *
     * Generated from protobuf field <code>int32 filename_strindex = 4;</code>
     * @return int
     */
    public function getFilenameStrindex()
    {
        return $this->filename_strindex;
    }

    /**
     * The object this entry is loaded from.  This can be a filename on
     * disk for the main binary and shared libraries, or virtual
     * abstractions like "[vdso]".
     *
     * Generated from protobuf field <code>int32 filename_strindex = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setFilenameStrindex($var)
    {
        GPBUtil::checkInt32($var);
        $this->filename_strindex = $var;

        return $this;
    }

    /**
     * References to attributes in ProfilesDictionary.attribute_table. [optional]
     *
     * Generated from protobuf field <code>repeated int32 attribute_indices = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAttributeIndices()
    {
        return $this->attribute_indices;
    }

    /**
     * References to attributes in ProfilesDictionary.attribute_table. [optional]
     *
     * Generated from protobuf field <code>repeated int32 attribute_indices = 5;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAttributeIndices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->attribute_indices = $arr;

        return $this;
    }

}

