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

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

/**
 * Options for exporting BAK files (SQL Server-only)
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.ExportContext.SqlBakExportOptions</code>
 */
class SqlBakExportOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Whether or not the export should be striped.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue striped = 1;</code>
     */
    private $striped = null;
    /**
     * Option for specifying how many stripes to use for the export.
     * If blank, and the value of the striped field is true,
     * the number of stripes is automatically chosen.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value stripe_count = 2;</code>
     */
    private $stripe_count = null;
    /**
     * Type of this bak file will be export, FULL or DIFF, SQL Server only
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.BakType bak_type = 4;</code>
     */
    private $bak_type = 0;
    /**
     * Deprecated: copy_only is deprecated. Use differential_base instead
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue copy_only = 5 [deprecated = true];</code>
     * @deprecated
     */
    protected $copy_only = null;
    /**
     * Whether or not the backup can be used as a differential base
     * copy_only backup can not be served as differential base
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue differential_base = 6;</code>
     */
    private $differential_base = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\BoolValue $striped
     *           Whether or not the export should be striped.
     *     @type \Google\Protobuf\Int32Value $stripe_count
     *           Option for specifying how many stripes to use for the export.
     *           If blank, and the value of the striped field is true,
     *           the number of stripes is automatically chosen.
     *     @type int $bak_type
     *           Type of this bak file will be export, FULL or DIFF, SQL Server only
     *     @type \Google\Protobuf\BoolValue $copy_only
     *           Deprecated: copy_only is deprecated. Use differential_base instead
     *     @type \Google\Protobuf\BoolValue $differential_base
     *           Whether or not the backup can be used as a differential base
     *           copy_only backup can not be served as differential base
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Whether or not the export should be striped.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue striped = 1;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getStriped()
    {
        return $this->striped;
    }

    public function hasStriped()
    {
        return isset($this->striped);
    }

    public function clearStriped()
    {
        unset($this->striped);
    }

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

     * Whether or not the export should be striped.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue striped = 1;</code>
     * @return bool|null
     */
    public function getStripedValue()
    {
        return $this->readWrapperValue("striped");
    }

    /**
     * Whether or not the export should be striped.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue striped = 1;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setStriped($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->striped = $var;

        return $this;
    }

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

     * Whether or not the export should be striped.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue striped = 1;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setStripedValue($var)
    {
        $this->writeWrapperValue("striped", $var);
        return $this;}

    /**
     * Option for specifying how many stripes to use for the export.
     * If blank, and the value of the striped field is true,
     * the number of stripes is automatically chosen.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value stripe_count = 2;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getStripeCount()
    {
        return $this->stripe_count;
    }

    public function hasStripeCount()
    {
        return isset($this->stripe_count);
    }

    public function clearStripeCount()
    {
        unset($this->stripe_count);
    }

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

     * Option for specifying how many stripes to use for the export.
     * If blank, and the value of the striped field is true,
     * the number of stripes is automatically chosen.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value stripe_count = 2;</code>
     * @return int|null
     */
    public function getStripeCountValue()
    {
        return $this->readWrapperValue("stripe_count");
    }

    /**
     * Option for specifying how many stripes to use for the export.
     * If blank, and the value of the striped field is true,
     * the number of stripes is automatically chosen.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value stripe_count = 2;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setStripeCount($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->stripe_count = $var;

        return $this;
    }

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

     * Option for specifying how many stripes to use for the export.
     * If blank, and the value of the striped field is true,
     * the number of stripes is automatically chosen.
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value stripe_count = 2;</code>
     * @param int|null $var
     * @return $this
     */
    public function setStripeCountValue($var)
    {
        $this->writeWrapperValue("stripe_count", $var);
        return $this;}

    /**
     * Type of this bak file will be export, FULL or DIFF, SQL Server only
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.BakType bak_type = 4;</code>
     * @return int
     */
    public function getBakType()
    {
        return $this->bak_type;
    }

    /**
     * Type of this bak file will be export, FULL or DIFF, SQL Server only
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.BakType bak_type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setBakType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BakType::class);
        $this->bak_type = $var;

        return $this;
    }

    /**
     * Deprecated: copy_only is deprecated. Use differential_base instead
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue copy_only = 5 [deprecated = true];</code>
     * @return \Google\Protobuf\BoolValue|null
     * @deprecated
     */
    public function getCopyOnly()
    {
        @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED);
        return $this->copy_only;
    }

    public function hasCopyOnly()
    {
        @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED);
        return isset($this->copy_only);
    }

    public function clearCopyOnly()
    {
        @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED);
        unset($this->copy_only);
    }

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

     * Deprecated: copy_only is deprecated. Use differential_base instead
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue copy_only = 5 [deprecated = true];</code>
     * @return bool|null
     */
    public function getCopyOnlyValue()
    {
        @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED);
        return $this->readWrapperValue("copy_only");
    }

    /**
     * Deprecated: copy_only is deprecated. Use differential_base instead
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue copy_only = 5 [deprecated = true];</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     * @deprecated
     */
    public function setCopyOnly($var)
    {
        @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->copy_only = $var;

        return $this;
    }

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

     * Deprecated: copy_only is deprecated. Use differential_base instead
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue copy_only = 5 [deprecated = true];</code>
     * @param bool|null $var
     * @return $this
     */
    public function setCopyOnlyValue($var)
    {
        $this->writeWrapperValue("copy_only", $var);
        return $this;}

    /**
     * Whether or not the backup can be used as a differential base
     * copy_only backup can not be served as differential base
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue differential_base = 6;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getDifferentialBase()
    {
        return $this->differential_base;
    }

    public function hasDifferentialBase()
    {
        return isset($this->differential_base);
    }

    public function clearDifferentialBase()
    {
        unset($this->differential_base);
    }

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

     * Whether or not the backup can be used as a differential base
     * copy_only backup can not be served as differential base
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue differential_base = 6;</code>
     * @return bool|null
     */
    public function getDifferentialBaseValue()
    {
        return $this->readWrapperValue("differential_base");
    }

    /**
     * Whether or not the backup can be used as a differential base
     * copy_only backup can not be served as differential base
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue differential_base = 6;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setDifferentialBase($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->differential_base = $var;

        return $this;
    }

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

     * Whether or not the backup can be used as a differential base
     * copy_only backup can not be served as differential base
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue differential_base = 6;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setDifferentialBaseValue($var)
    {
        $this->writeWrapperValue("differential_base", $var);
        return $this;}

}


