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

namespace Google\Cloud\Compute\V1;

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

/**
 * Configuration parameters of autoscaling based on load balancing.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization</code>
 */
class AutoscalingPolicyLoadBalancingUtilization extends \Google\Protobuf\Internal\Message
{
    /**
     * Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that the autoscaler maintains. Must be a positive float value. If not defined, the default is 0.8.
     *
     * Generated from protobuf field <code>double utilization_target = 215905870;</code>
     */
    private $utilization_target = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $utilization_target
     *           Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that the autoscaler maintains. Must be a positive float value. If not defined, the default is 0.8.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that the autoscaler maintains. Must be a positive float value. If not defined, the default is 0.8.
     *
     * Generated from protobuf field <code>double utilization_target = 215905870;</code>
     * @return float
     */
    public function getUtilizationTarget()
    {
        return isset($this->utilization_target) ? $this->utilization_target : 0.0;
    }

    public function hasUtilizationTarget()
    {
        return isset($this->utilization_target);
    }

    public function clearUtilizationTarget()
    {
        unset($this->utilization_target);
    }

    /**
     * Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that the autoscaler maintains. Must be a positive float value. If not defined, the default is 0.8.
     *
     * Generated from protobuf field <code>double utilization_target = 215905870;</code>
     * @param float $var
     * @return $this
     */
    public function setUtilizationTarget($var)
    {
        GPBUtil::checkDouble($var);
        $this->utilization_target = $var;

        return $this;
    }

}

