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

/**
 * Salesforce source configuration
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.SalesforceSourceConfig</code>
 */
class SalesforceSourceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Salesforce objects to retrieve from the source.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.SalesforceOrg include_objects = 1;</code>
     */
    protected $include_objects = null;
    /**
     * Salesforce objects to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.SalesforceOrg exclude_objects = 2;</code>
     */
    protected $exclude_objects = null;
    /**
     * Required. Salesforce objects polling interval. The interval at which new
     * changes will be polled for each object. The duration must be between 5
     * minutes and 24 hours.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration polling_interval = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $polling_interval = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastream\V1\SalesforceOrg $include_objects
     *           Salesforce objects to retrieve from the source.
     *     @type \Google\Cloud\Datastream\V1\SalesforceOrg $exclude_objects
     *           Salesforce objects to exclude from the stream.
     *     @type \Google\Protobuf\Duration $polling_interval
     *           Required. Salesforce objects polling interval. The interval at which new
     *           changes will be polled for each object. The duration must be between 5
     *           minutes and 24 hours.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

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

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

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

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

        return $this;
    }

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

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

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

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

        return $this;
    }

    /**
     * Required. Salesforce objects polling interval. The interval at which new
     * changes will be polled for each object. The duration must be between 5
     * minutes and 24 hours.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration polling_interval = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getPollingInterval()
    {
        return $this->polling_interval;
    }

    public function hasPollingInterval()
    {
        return isset($this->polling_interval);
    }

    public function clearPollingInterval()
    {
        unset($this->polling_interval);
    }

    /**
     * Required. Salesforce objects polling interval. The interval at which new
     * changes will be polled for each object. The duration must be between 5
     * minutes and 24 hours.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration polling_interval = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setPollingInterval($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->polling_interval = $var;

        return $this;
    }

}

