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

namespace Google\Cloud\Asset\V1\IamPolicyAnalysisResult;

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

/**
 * A directional edge.
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.IamPolicyAnalysisResult.Edge</code>
 */
class Edge extends \Google\Protobuf\Internal\Message
{
    /**
     * The source node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string source_node = 1;</code>
     */
    private $source_node = '';
    /**
     * The target node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string target_node = 2;</code>
     */
    private $target_node = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $source_node
     *           The source node of the edge. For example, it could be a full resource
     *           name for a resource node or an email of an identity.
     *     @type string $target_node
     *           The target node of the edge. For example, it could be a full resource
     *           name for a resource node or an email of an identity.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\Assets::initOnce();
        parent::__construct($data);
    }

    /**
     * The source node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string source_node = 1;</code>
     * @return string
     */
    public function getSourceNode()
    {
        return $this->source_node;
    }

    /**
     * The source node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string source_node = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceNode($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_node = $var;

        return $this;
    }

    /**
     * The target node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string target_node = 2;</code>
     * @return string
     */
    public function getTargetNode()
    {
        return $this->target_node;
    }

    /**
     * The target node of the edge. For example, it could be a full resource
     * name for a resource node or an email of an identity.
     *
     * Generated from protobuf field <code>string target_node = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetNode($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_node = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Edge::class, \Google\Cloud\Asset\V1\IamPolicyAnalysisResult_Edge::class);

