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

namespace Google\Cloud\Run\V2;

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

/**
 * VPC Access settings. For more information on creating a VPC Connector, visit
 * https://cloud.google.com/vpc/docs/configure-serverless-vpc-access For
 * information on how to configure Cloud Run with an existing VPC Connector,
 * visit https://cloud.google.com/run/docs/configuring/connecting-vpc
 *
 * Generated from protobuf message <code>google.cloud.run.v2.VpcAccess</code>
 */
class VpcAccess extends \Google\Protobuf\Internal\Message
{
    /**
     * VPC Access connector name.
     * Format: projects/{project}/locations/{location}/connectors/{connector},
     * where {project} can be project id or number.
     *
     * Generated from protobuf field <code>string connector = 1 [(.google.api.resource_reference) = {</code>
     */
    private $connector = '';
    /**
     * Traffic VPC egress settings.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess.VpcEgress egress = 2;</code>
     */
    private $egress = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $connector
     *           VPC Access connector name.
     *           Format: projects/{project}/locations/{location}/connectors/{connector},
     *           where {project} can be project id or number.
     *     @type int $egress
     *           Traffic VPC egress settings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce();
        parent::__construct($data);
    }

    /**
     * VPC Access connector name.
     * Format: projects/{project}/locations/{location}/connectors/{connector},
     * where {project} can be project id or number.
     *
     * Generated from protobuf field <code>string connector = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getConnector()
    {
        return $this->connector;
    }

    /**
     * VPC Access connector name.
     * Format: projects/{project}/locations/{location}/connectors/{connector},
     * where {project} can be project id or number.
     *
     * Generated from protobuf field <code>string connector = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setConnector($var)
    {
        GPBUtil::checkString($var, True);
        $this->connector = $var;

        return $this;
    }

    /**
     * Traffic VPC egress settings.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess.VpcEgress egress = 2;</code>
     * @return int
     */
    public function getEgress()
    {
        return $this->egress;
    }

    /**
     * Traffic VPC egress settings.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess.VpcEgress egress = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEgress($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\VpcAccess\VpcEgress::class);
        $this->egress = $var;

        return $this;
    }

}

