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

namespace Google\Cloud\Datastream\V1;

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

/**
 * The VPC Peering configuration is used to create VPC peering between
 * Datastream and the consumer's VPC.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.VpcPeeringConfig</code>
 */
class VpcPeeringConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Fully qualified name of the VPC that Datastream will peer to.
     * Format: `projects/{project}/global/{networks}/{name}`
     *
     * Generated from protobuf field <code>string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $vpc = '';
    /**
     * Required. A free subnet for peering. (CIDR of /29)
     *
     * Generated from protobuf field <code>string subnet = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $subnet = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $vpc
     *           Required. Fully qualified name of the VPC that Datastream will peer to.
     *           Format: `projects/{project}/global/{networks}/{name}`
     *     @type string $subnet
     *           Required. A free subnet for peering. (CIDR of /29)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Fully qualified name of the VPC that Datastream will peer to.
     * Format: `projects/{project}/global/{networks}/{name}`
     *
     * Generated from protobuf field <code>string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getVpc()
    {
        return $this->vpc;
    }

    /**
     * Required. Fully qualified name of the VPC that Datastream will peer to.
     * Format: `projects/{project}/global/{networks}/{name}`
     *
     * Generated from protobuf field <code>string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setVpc($var)
    {
        GPBUtil::checkString($var, True);
        $this->vpc = $var;

        return $this;
    }

    /**
     * Required. A free subnet for peering. (CIDR of /29)
     *
     * Generated from protobuf field <code>string subnet = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSubnet()
    {
        return $this->subnet;
    }

    /**
     * Required. A free subnet for peering. (CIDR of /29)
     *
     * Generated from protobuf field <code>string subnet = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSubnet($var)
    {
        GPBUtil::checkString($var, True);
        $this->subnet = $var;

        return $this;
    }

}

