<?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;

/**
 * Per-zone constraints on location policy for this zone.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.LocationPolicyLocationConstraints</code>
 */
class LocationPolicyLocationConstraints extends \Google\Protobuf\Internal\Message
{
    /**
     * Maximum number of items that are allowed to be placed in this zone. The value must be non-negative.
     *
     * Generated from protobuf field <code>optional int32 max_count = 287620724;</code>
     */
    private $max_count = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $max_count
     *           Maximum number of items that are allowed to be placed in this zone. The value must be non-negative.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Maximum number of items that are allowed to be placed in this zone. The value must be non-negative.
     *
     * Generated from protobuf field <code>optional int32 max_count = 287620724;</code>
     * @return int
     */
    public function getMaxCount()
    {
        return isset($this->max_count) ? $this->max_count : 0;
    }

    public function hasMaxCount()
    {
        return isset($this->max_count);
    }

    public function clearMaxCount()
    {
        unset($this->max_count);
    }

    /**
     * Maximum number of items that are allowed to be placed in this zone. The value must be non-negative.
     *
     * Generated from protobuf field <code>optional int32 max_count = 287620724;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_count = $var;

        return $this;
    }

}

