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

namespace Google\Cloud\Asset\V1;

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

/**
 * The related resources of the primary resource.
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.RelatedResources</code>
 */
class RelatedResources extends \Google\Protobuf\Internal\Message
{
    /**
     * The detailed related resources of the primary resource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.RelatedResource related_resources = 1;</code>
     */
    private $related_resources;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Asset\V1\RelatedResource>|\Google\Protobuf\Internal\RepeatedField $related_resources
     *           The detailed related resources of the primary resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\Assets::initOnce();
        parent::__construct($data);
    }

    /**
     * The detailed related resources of the primary resource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.RelatedResource related_resources = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRelatedResources()
    {
        return $this->related_resources;
    }

    /**
     * The detailed related resources of the primary resource.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.RelatedResource related_resources = 1;</code>
     * @param array<\Google\Cloud\Asset\V1\RelatedResource>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRelatedResources($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Asset\V1\RelatedResource::class);
        $this->related_resources = $arr;

        return $this;
    }

}

