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

namespace Google\Cloud\BigQuery\DataTransfer\V1;

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

/**
 * Represents preferences for sending email notifications for transfer run
 * events.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.EmailPreferences</code>
 */
class EmailPreferences extends \Google\Protobuf\Internal\Message
{
    /**
     * If true, email notifications will be sent on transfer run failures.
     *
     * Generated from protobuf field <code>bool enable_failure_email = 1;</code>
     */
    private $enable_failure_email = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enable_failure_email
     *           If true, email notifications will be sent on transfer run failures.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce();
        parent::__construct($data);
    }

    /**
     * If true, email notifications will be sent on transfer run failures.
     *
     * Generated from protobuf field <code>bool enable_failure_email = 1;</code>
     * @return bool
     */
    public function getEnableFailureEmail()
    {
        return $this->enable_failure_email;
    }

    /**
     * If true, email notifications will be sent on transfer run failures.
     *
     * Generated from protobuf field <code>bool enable_failure_email = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableFailureEmail($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_failure_email = $var;

        return $this;
    }

}

