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

namespace Google\Cloud\SecurityCenter\V1\Kubernetes;

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

/**
 * Provides GKE node pool information.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.Kubernetes.NodePool</code>
 */
class NodePool extends \Google\Protobuf\Internal\Message
{
    /**
     * Kubernetes node pool name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Nodes associated with the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2;</code>
     */
    private $nodes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Kubernetes node pool name.
     *     @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $nodes
     *           Nodes associated with the finding.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce();
        parent::__construct($data);
    }

    /**
     * Kubernetes node pool name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Kubernetes node pool name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Nodes associated with the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNodes()
    {
        return $this->nodes;
    }

    /**
     * Nodes associated with the finding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Node::class);
        $this->nodes = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NodePool::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_NodePool::class);

