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

namespace Google\Cloud\Batch\V1\AllocationPolicy;

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

/**
 * NetworkPolicy describes VM instance network configurations.
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.AllocationPolicy.NetworkPolicy</code>
 */
class NetworkPolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * Network configurations.
     *
     * Generated from protobuf field <code>repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1;</code>
     */
    private $network_interfaces;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces
     *           Network configurations.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce();
        parent::__construct($data);
    }

    /**
     * Network configurations.
     *
     * Generated from protobuf field <code>repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNetworkInterfaces()
    {
        return $this->network_interfaces;
    }

    /**
     * Network configurations.
     *
     * Generated from protobuf field <code>repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1;</code>
     * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNetworkInterfaces($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface::class);
        $this->network_interfaces = $arr;

        return $this;
    }

}


