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

namespace Google\Cloud\Eventarc\V1;

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

/**
 * Network Configuration that can be inherited by other protos.
 *
 * Generated from protobuf message <code>google.cloud.eventarc.v1.NetworkConfig</code>
 */
class NetworkConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the NetworkAttachment that allows access to the
     * customer's VPC. Format:
     * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
     *
     * Generated from protobuf field <code>string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $network_attachment = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $network_attachment
     *           Required. Name of the NetworkAttachment that allows access to the
     *           customer's VPC. Format:
     *           `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Eventarc\V1\NetworkConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the NetworkAttachment that allows access to the
     * customer's VPC. Format:
     * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
     *
     * Generated from protobuf field <code>string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getNetworkAttachment()
    {
        return $this->network_attachment;
    }

    /**
     * Required. Name of the NetworkAttachment that allows access to the
     * customer's VPC. Format:
     * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
     *
     * Generated from protobuf field <code>string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setNetworkAttachment($var)
    {
        GPBUtil::checkString($var, True);
        $this->network_attachment = $var;

        return $this;
    }

}

