<?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;

/**
 * PostgreSQL data source configuration
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.PostgresqlSourceConfig</code>
 */
class PostgresqlSourceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * PostgreSQL objects to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1;</code>
     */
    private $include_objects = null;
    /**
     * PostgreSQL objects to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2;</code>
     */
    private $exclude_objects = null;
    /**
     * Required. The name of the logical replication slot that's configured with the
     * pgoutput plugin.
     *
     * Generated from protobuf field <code>string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $replication_slot = '';
    /**
     * Required. The name of the publication that includes the set of all tables that are
     * defined in the stream's include_objects.
     *
     * Generated from protobuf field <code>string publication = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $publication = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $include_objects
     *           PostgreSQL objects to include in the stream.
     *     @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $exclude_objects
     *           PostgreSQL objects to exclude from the stream.
     *     @type string $replication_slot
     *           Required. The name of the logical replication slot that's configured with the
     *           pgoutput plugin.
     *     @type string $publication
     *           Required. The name of the publication that includes the set of all tables that are
     *           defined in the stream's include_objects.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * PostgreSQL objects to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1;</code>
     * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null
     */
    public function getIncludeObjects()
    {
        return $this->include_objects;
    }

    public function hasIncludeObjects()
    {
        return isset($this->include_objects);
    }

    public function clearIncludeObjects()
    {
        unset($this->include_objects);
    }

    /**
     * PostgreSQL objects to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1;</code>
     * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var
     * @return $this
     */
    public function setIncludeObjects($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class);
        $this->include_objects = $var;

        return $this;
    }

    /**
     * PostgreSQL objects to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2;</code>
     * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null
     */
    public function getExcludeObjects()
    {
        return $this->exclude_objects;
    }

    public function hasExcludeObjects()
    {
        return isset($this->exclude_objects);
    }

    public function clearExcludeObjects()
    {
        unset($this->exclude_objects);
    }

    /**
     * PostgreSQL objects to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2;</code>
     * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var
     * @return $this
     */
    public function setExcludeObjects($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class);
        $this->exclude_objects = $var;

        return $this;
    }

    /**
     * Required. The name of the logical replication slot that's configured with the
     * pgoutput plugin.
     *
     * Generated from protobuf field <code>string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getReplicationSlot()
    {
        return $this->replication_slot;
    }

    /**
     * Required. The name of the logical replication slot that's configured with the
     * pgoutput plugin.
     *
     * Generated from protobuf field <code>string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setReplicationSlot($var)
    {
        GPBUtil::checkString($var, True);
        $this->replication_slot = $var;

        return $this;
    }

    /**
     * Required. The name of the publication that includes the set of all tables that are
     * defined in the stream's include_objects.
     *
     * Generated from protobuf field <code>string publication = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPublication()
    {
        return $this->publication;
    }

    /**
     * Required. The name of the publication that includes the set of all tables that are
     * defined in the stream's include_objects.
     *
     * Generated from protobuf field <code>string publication = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPublication($var)
    {
        GPBUtil::checkString($var, True);
        $this->publication = $var;

        return $this;
    }

}

