<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/metric.proto

namespace Google\Cloud\Monitoring\V3\TextLocator;

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

/**
 * The position of a byte within the text.
 *
 * Generated from protobuf message <code>google.monitoring.v3.TextLocator.Position</code>
 */
class Position extends \Google\Protobuf\Internal\Message
{
    /**
     * The line, starting with 1, where the byte is positioned.
     *
     * Generated from protobuf field <code>int32 line = 1;</code>
     */
    private $line = 0;
    /**
     * The column within the line, starting with 1, where the byte is
     * positioned. This is a byte index even though the text is UTF-8.
     *
     * Generated from protobuf field <code>int32 column = 2;</code>
     */
    private $column = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $line
     *           The line, starting with 1, where the byte is positioned.
     *     @type int $column
     *           The column within the line, starting with 1, where the byte is
     *           positioned. This is a byte index even though the text is UTF-8.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Metric::initOnce();
        parent::__construct($data);
    }

    /**
     * The line, starting with 1, where the byte is positioned.
     *
     * Generated from protobuf field <code>int32 line = 1;</code>
     * @return int
     */
    public function getLine()
    {
        return $this->line;
    }

    /**
     * The line, starting with 1, where the byte is positioned.
     *
     * Generated from protobuf field <code>int32 line = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setLine($var)
    {
        GPBUtil::checkInt32($var);
        $this->line = $var;

        return $this;
    }

    /**
     * The column within the line, starting with 1, where the byte is
     * positioned. This is a byte index even though the text is UTF-8.
     *
     * Generated from protobuf field <code>int32 column = 2;</code>
     * @return int
     */
    public function getColumn()
    {
        return $this->column;
    }

    /**
     * The column within the line, starting with 1, where the byte is
     * positioned. This is a byte index even though the text is UTF-8.
     *
     * Generated from protobuf field <code>int32 column = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setColumn($var)
    {
        GPBUtil::checkInt32($var);
        $this->column = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Position::class, \Google\Cloud\Monitoring\V3\TextLocator_Position::class);

