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

namespace Google\Cloud\Vision\V1;

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

/**
 * Parameters for crop hints annotation request.
 *
 * Generated from protobuf message <code>google.cloud.vision.v1.CropHintsParams</code>
 */
class CropHintsParams extends \Google\Protobuf\Internal\Message
{
    /**
     * Aspect ratios in floats, representing the ratio of the width to the height
     * of the image. For example, if the desired aspect ratio is 4/3, the
     * corresponding float value should be 1.33333.  If not specified, the
     * best possible crop is returned. The number of provided aspect ratios is
     * limited to a maximum of 16; any aspect ratios provided after the 16th are
     * ignored.
     *
     * Generated from protobuf field <code>repeated float aspect_ratios = 1;</code>
     */
    private $aspect_ratios;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<float>|\Google\Protobuf\Internal\RepeatedField $aspect_ratios
     *           Aspect ratios in floats, representing the ratio of the width to the height
     *           of the image. For example, if the desired aspect ratio is 4/3, the
     *           corresponding float value should be 1.33333.  If not specified, the
     *           best possible crop is returned. The number of provided aspect ratios is
     *           limited to a maximum of 16; any aspect ratios provided after the 16th are
     *           ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce();
        parent::__construct($data);
    }

    /**
     * Aspect ratios in floats, representing the ratio of the width to the height
     * of the image. For example, if the desired aspect ratio is 4/3, the
     * corresponding float value should be 1.33333.  If not specified, the
     * best possible crop is returned. The number of provided aspect ratios is
     * limited to a maximum of 16; any aspect ratios provided after the 16th are
     * ignored.
     *
     * Generated from protobuf field <code>repeated float aspect_ratios = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAspectRatios()
    {
        return $this->aspect_ratios;
    }

    /**
     * Aspect ratios in floats, representing the ratio of the width to the height
     * of the image. For example, if the desired aspect ratio is 4/3, the
     * corresponding float value should be 1.33333.  If not specified, the
     * best possible crop is returned. The number of provided aspect ratios is
     * limited to a maximum of 16; any aspect ratios provided after the 16th are
     * ignored.
     *
     * Generated from protobuf field <code>repeated float aspect_ratios = 1;</code>
     * @param array<float>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAspectRatios($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT);
        $this->aspect_ratios = $arr;

        return $this;
    }

}

