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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.PacketMirroringMirroredResourceInfo</code>
 */
class PacketMirroringMirroredResourceInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring. Note that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo instances = 29097598;</code>
     */
    private $instances;
    /**
     * A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring. You may specify a maximum of 5 subnetworks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo subnetworks = 415853125;</code>
     */
    private $subnetworks;
    /**
     * A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     */
    private $tags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoInstanceInfo>|\Google\Protobuf\Internal\RepeatedField $instances
     *           A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring. Note that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances.
     *     @type array<\Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoSubnetInfo>|\Google\Protobuf\Internal\RepeatedField $subnetworks
     *           A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring. You may specify a maximum of 5 subnetworks.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $tags
     *           A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring. Note that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo instances = 29097598;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstances()
    {
        return $this->instances;
    }

    /**
     * A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring. Note that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo instances = 29097598;</code>
     * @param array<\Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoInstanceInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstances($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoInstanceInfo::class);
        $this->instances = $arr;

        return $this;
    }

    /**
     * A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring. You may specify a maximum of 5 subnetworks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo subnetworks = 415853125;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubnetworks()
    {
        return $this->subnetworks;
    }

    /**
     * A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring. You may specify a maximum of 5 subnetworks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo subnetworks = 415853125;</code>
     * @param array<\Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoSubnetInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSubnetworks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\PacketMirroringMirroredResourceInfoSubnetInfo::class);
        $this->subnetworks = $arr;

        return $this;
    }

    /**
     * A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

}

