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

namespace Google\Cloud\VmwareEngine\V1;

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

/**
 * Information about the type and number of nodes associated with the cluster.
 *
 * Generated from protobuf message <code>google.cloud.vmwareengine.v1.NodeTypeConfig</code>
 */
class NodeTypeConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The number of nodes of this type in the cluster
     *
     * Generated from protobuf field <code>int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $node_count = 0;
    /**
     * Optional. Customized number of cores available to each node of the type.
     * This number must always be one of `nodeType.availableCustomCoreCounts`.
     * If zero is provided max value from `nodeType.availableCustomCoreCounts`
     * will be used.
     *
     * Generated from protobuf field <code>int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $custom_core_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $node_count
     *           Required. The number of nodes of this type in the cluster
     *     @type int $custom_core_count
     *           Optional. Customized number of cores available to each node of the type.
     *           This number must always be one of `nodeType.availableCustomCoreCounts`.
     *           If zero is provided max value from `nodeType.availableCustomCoreCounts`
     *           will be used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The number of nodes of this type in the cluster
     *
     * Generated from protobuf field <code>int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getNodeCount()
    {
        return $this->node_count;
    }

    /**
     * Required. The number of nodes of this type in the cluster
     *
     * Generated from protobuf field <code>int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setNodeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->node_count = $var;

        return $this;
    }

    /**
     * Optional. Customized number of cores available to each node of the type.
     * This number must always be one of `nodeType.availableCustomCoreCounts`.
     * If zero is provided max value from `nodeType.availableCustomCoreCounts`
     * will be used.
     *
     * Generated from protobuf field <code>int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getCustomCoreCount()
    {
        return $this->custom_core_count;
    }

    /**
     * Optional. Customized number of cores available to each node of the type.
     * This number must always be one of `nodeType.availableCustomCoreCounts`.
     * If zero is provided max value from `nodeType.availableCustomCoreCounts`
     * will be used.
     *
     * Generated from protobuf field <code>int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setCustomCoreCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->custom_core_count = $var;

        return $this;
    }

}

