<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/sql/v1beta4/cloud_sql_resources.proto

namespace Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions;

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

/**
 * Options for exporting from MySQL.
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.ExportContext.SqlExportOptions.MysqlExportOptions</code>
 */
class MysqlExportOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Option to include SQL statement required to set up replication. If set
     * to `1`, the dump file includes a CHANGE MASTER TO statement with the
     * binary log coordinates, and --set-gtid-purged is set to ON. If set to
     * `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     * has no effect. If set to any value other than `1`, --set-gtid-purged
     * is set to OFF.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value master_data = 1;</code>
     */
    private $master_data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Int32Value $master_data
     *           Option to include SQL statement required to set up replication. If set
     *           to `1`, the dump file includes a CHANGE MASTER TO statement with the
     *           binary log coordinates, and --set-gtid-purged is set to ON. If set to
     *           `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     *           has no effect. If set to any value other than `1`, --set-gtid-purged
     *           is set to OFF.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Option to include SQL statement required to set up replication. If set
     * to `1`, the dump file includes a CHANGE MASTER TO statement with the
     * binary log coordinates, and --set-gtid-purged is set to ON. If set to
     * `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     * has no effect. If set to any value other than `1`, --set-gtid-purged
     * is set to OFF.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value master_data = 1;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getMasterData()
    {
        return $this->master_data;
    }

    public function hasMasterData()
    {
        return isset($this->master_data);
    }

    public function clearMasterData()
    {
        unset($this->master_data);
    }

    /**
     * Returns the unboxed value from <code>getMasterData()</code>

     * Option to include SQL statement required to set up replication. If set
     * to `1`, the dump file includes a CHANGE MASTER TO statement with the
     * binary log coordinates, and --set-gtid-purged is set to ON. If set to
     * `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     * has no effect. If set to any value other than `1`, --set-gtid-purged
     * is set to OFF.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value master_data = 1;</code>
     * @return int|null
     */
    public function getMasterDataValue()
    {
        return $this->readWrapperValue("master_data");
    }

    /**
     * Option to include SQL statement required to set up replication. If set
     * to `1`, the dump file includes a CHANGE MASTER TO statement with the
     * binary log coordinates, and --set-gtid-purged is set to ON. If set to
     * `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     * has no effect. If set to any value other than `1`, --set-gtid-purged
     * is set to OFF.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value master_data = 1;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setMasterData($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->master_data = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

     * Option to include SQL statement required to set up replication. If set
     * to `1`, the dump file includes a CHANGE MASTER TO statement with the
     * binary log coordinates, and --set-gtid-purged is set to ON. If set to
     * `2`, the CHANGE MASTER TO statement is written as a SQL comment and
     * has no effect. If set to any value other than `1`, --set-gtid-purged
     * is set to OFF.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value master_data = 1;</code>
     * @param int|null $var
     * @return $this
     */
    public function setMasterDataValue($var)
    {
        $this->writeWrapperValue("master_data", $var);
        return $this;}

}


