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

namespace Google\Cloud\SecurityCenter\V1\ResourcePath;

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

/**
 * A node within the resource path. Each node represents a resource within the
 * resource hierarchy.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode</code>
 */
class ResourcePathNode extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of resource this node represents.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType node_type = 1;</code>
     */
    private $node_type = 0;
    /**
     * The ID of the resource this node represents.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     */
    private $id = '';
    /**
     * The display name of the resource this node represents.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     */
    private $display_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $node_type
     *           The type of resource this node represents.
     *     @type string $id
     *           The ID of the resource this node represents.
     *     @type string $display_name
     *           The display name of the resource this node represents.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of resource this node represents.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType node_type = 1;</code>
     * @return int
     */
    public function getNodeType()
    {
        return $this->node_type;
    }

    /**
     * The type of resource this node represents.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType node_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setNodeType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\ResourcePath\ResourcePathNodeType::class);
        $this->node_type = $var;

        return $this;
    }

    /**
     * The ID of the resource this node represents.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * The ID of the resource this node represents.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * The display name of the resource this node represents.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The display name of the resource this node represents.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

}

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

