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

namespace Google\Cloud\Container\V1\LinuxNodeConfig;

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

/**
 * Hugepages amount in both 2m and 1g size
 *
 * Generated from protobuf message <code>google.container.v1.LinuxNodeConfig.HugepagesConfig</code>
 */
class HugepagesConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Amount of 2M hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $hugepage_size2m = null;
    /**
     * Optional. Amount of 1G hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $hugepage_size1g = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $hugepage_size2m
     *           Optional. Amount of 2M hugepages
     *     @type int $hugepage_size1g
     *           Optional. Amount of 1G hugepages
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Amount of 2M hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getHugepageSize2M()
    {
        return isset($this->hugepage_size2m) ? $this->hugepage_size2m : 0;
    }

    public function hasHugepageSize2M()
    {
        return isset($this->hugepage_size2m);
    }

    public function clearHugepageSize2M()
    {
        unset($this->hugepage_size2m);
    }

    /**
     * Optional. Amount of 2M hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setHugepageSize2M($var)
    {
        GPBUtil::checkInt32($var);
        $this->hugepage_size2m = $var;

        return $this;
    }

    /**
     * Optional. Amount of 1G hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getHugepageSize1G()
    {
        return isset($this->hugepage_size1g) ? $this->hugepage_size1g : 0;
    }

    public function hasHugepageSize1G()
    {
        return isset($this->hugepage_size1g);
    }

    public function clearHugepageSize1G()
    {
        unset($this->hugepage_size1g);
    }

    /**
     * Optional. Amount of 1G hugepages
     *
     * Generated from protobuf field <code>optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setHugepageSize1G($var)
    {
        GPBUtil::checkInt32($var);
        $this->hugepage_size1g = $var;

        return $this;
    }

}


