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

namespace Google\Cloud\SecurityCenter\V1;

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

/**
 * Represents the path of resources leading up to the resource this finding is
 * about.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.ResourcePath</code>
 */
class ResourcePath extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of nodes that make the up resource path, ordered from lowest
     * level to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode nodes = 1;</code>
     */
    private $nodes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\SecurityCenter\V1\ResourcePath\ResourcePathNode>|\Google\Protobuf\Internal\RepeatedField $nodes
     *           The list of nodes that make the up resource path, ordered from lowest
     *           level to highest level.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of nodes that make the up resource path, ordered from lowest
     * level to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode nodes = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNodes()
    {
        return $this->nodes;
    }

    /**
     * The list of nodes that make the up resource path, ordered from lowest
     * level to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode nodes = 1;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\ResourcePath\ResourcePathNode>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ResourcePath\ResourcePathNode::class);
        $this->nodes = $arr;

        return $this;
    }

}

