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

namespace Google\Cloud\SecurityCenter\V1\AttackPath;

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

/**
 * Represents one point that an attacker passes through in this attack path.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.AttackPath.AttackPathNode</code>
 */
class AttackPathNode extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the resource at this point in the attack path.
     * The format of the name follows the Cloud Asset Inventory [resource
     * name
     * format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *
     * Generated from protobuf field <code>string resource = 1;</code>
     */
    private $resource = '';
    /**
     * The [supported resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     *
     * Generated from protobuf field <code>string resource_type = 2;</code>
     */
    private $resource_type = '';
    /**
     * Human-readable name of this resource.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     */
    private $display_name = '';
    /**
     * The findings associated with this node in the attack path.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4;</code>
     */
    private $associated_findings;
    /**
     * Unique id of the attack path node.
     *
     * Generated from protobuf field <code>string uuid = 5;</code>
     */
    private $uuid = '';
    /**
     * A list of attack step nodes that exist in this attack path node.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6;</code>
     */
    private $attack_steps;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource
     *           The name of the resource at this point in the attack path.
     *           The format of the name follows the Cloud Asset Inventory [resource
     *           name
     *           format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *     @type string $resource_type
     *           The [supported resource
     *           type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     *     @type string $display_name
     *           Human-readable name of this resource.
     *     @type array<\Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\PathNodeAssociatedFinding>|\Google\Protobuf\Internal\RepeatedField $associated_findings
     *           The findings associated with this node in the attack path.
     *     @type string $uuid
     *           Unique id of the attack path node.
     *     @type array<\Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\AttackStepNode>|\Google\Protobuf\Internal\RepeatedField $attack_steps
     *           A list of attack step nodes that exist in this attack path node.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\AttackPath::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the resource at this point in the attack path.
     * The format of the name follows the Cloud Asset Inventory [resource
     * name
     * format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *
     * Generated from protobuf field <code>string resource = 1;</code>
     * @return string
     */
    public function getResource()
    {
        return $this->resource;
    }

    /**
     * The name of the resource at this point in the attack path.
     * The format of the name follows the Cloud Asset Inventory [resource
     * name
     * format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *
     * Generated from protobuf field <code>string resource = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource = $var;

        return $this;
    }

    /**
     * The [supported resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     *
     * Generated from protobuf field <code>string resource_type = 2;</code>
     * @return string
     */
    public function getResourceType()
    {
        return $this->resource_type;
    }

    /**
     * The [supported resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     *
     * Generated from protobuf field <code>string resource_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setResourceType($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_type = $var;

        return $this;
    }

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

    /**
     * Human-readable name of this resource.
     *
     * 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;
    }

    /**
     * The findings associated with this node in the attack path.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAssociatedFindings()
    {
        return $this->associated_findings;
    }

    /**
     * The findings associated with this node in the attack path.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\PathNodeAssociatedFinding>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAssociatedFindings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\PathNodeAssociatedFinding::class);
        $this->associated_findings = $arr;

        return $this;
    }

    /**
     * Unique id of the attack path node.
     *
     * Generated from protobuf field <code>string uuid = 5;</code>
     * @return string
     */
    public function getUuid()
    {
        return $this->uuid;
    }

    /**
     * Unique id of the attack path node.
     *
     * Generated from protobuf field <code>string uuid = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setUuid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uuid = $var;

        return $this;
    }

    /**
     * A list of attack step nodes that exist in this attack path node.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAttackSteps()
    {
        return $this->attack_steps;
    }

    /**
     * A list of attack step nodes that exist in this attack path node.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\AttackStepNode>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAttackSteps($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\AttackPath\AttackPathNode\AttackStepNode::class);
        $this->attack_steps = $arr;

        return $this;
    }

}

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

