<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/vision/v1/geometry.proto

namespace Google\Cloud\Vision\V1;

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

/**
 * A 3D position in the image, used primarily for Face detection landmarks.
 * A valid Position must have both x and y coordinates.
 * The position coordinates are in the same scale as the original image.
 *
 * Generated from protobuf message <code>google.cloud.vision.v1.Position</code>
 */
class Position extends \Google\Protobuf\Internal\Message
{
    /**
     * X coordinate.
     *
     * Generated from protobuf field <code>float x = 1;</code>
     */
    private $x = 0.0;
    /**
     * Y coordinate.
     *
     * Generated from protobuf field <code>float y = 2;</code>
     */
    private $y = 0.0;
    /**
     * Z coordinate (or depth).
     *
     * Generated from protobuf field <code>float z = 3;</code>
     */
    private $z = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $x
     *           X coordinate.
     *     @type float $y
     *           Y coordinate.
     *     @type float $z
     *           Z coordinate (or depth).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce();
        parent::__construct($data);
    }

    /**
     * X coordinate.
     *
     * Generated from protobuf field <code>float x = 1;</code>
     * @return float
     */
    public function getX()
    {
        return $this->x;
    }

    /**
     * X coordinate.
     *
     * Generated from protobuf field <code>float x = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setX($var)
    {
        GPBUtil::checkFloat($var);
        $this->x = $var;

        return $this;
    }

    /**
     * Y coordinate.
     *
     * Generated from protobuf field <code>float y = 2;</code>
     * @return float
     */
    public function getY()
    {
        return $this->y;
    }

    /**
     * Y coordinate.
     *
     * Generated from protobuf field <code>float y = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setY($var)
    {
        GPBUtil::checkFloat($var);
        $this->y = $var;

        return $this;
    }

    /**
     * Z coordinate (or depth).
     *
     * Generated from protobuf field <code>float z = 3;</code>
     * @return float
     */
    public function getZ()
    {
        return $this->z;
    }

    /**
     * Z coordinate (or depth).
     *
     * Generated from protobuf field <code>float z = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setZ($var)
    {
        GPBUtil::checkFloat($var);
        $this->z = $var;

        return $this;
    }

}

