<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Standard connection format.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.StandardConnectionFormat</code>
 */
class StandardConnectionFormat extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Specifies whether the client connects directly to the host[:port]
     * in the connection URI.
     *
     * Generated from protobuf field <code>bool direct_connection = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $direct_connection = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $direct_connection
     *           Optional. Specifies whether the client connects directly to the host[:port]
     *           in the connection URI.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Specifies whether the client connects directly to the host[:port]
     * in the connection URI.
     *
     * Generated from protobuf field <code>bool direct_connection = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getDirectConnection()
    {
        return $this->direct_connection;
    }

    /**
     * Optional. Specifies whether the client connects directly to the host[:port]
     * in the connection URI.
     *
     * Generated from protobuf field <code>bool direct_connection = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setDirectConnection($var)
    {
        GPBUtil::checkBool($var);
        $this->direct_connection = $var;

        return $this;
    }

}

