<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/storagetransfer/v1/transfer_types.proto

namespace Google\Cloud\StorageTransfer\V1;

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

/**
 * TransferOptions define the actions to be performed on objects in a transfer.
 *
 * Generated from protobuf message <code>google.storagetransfer.v1.TransferOptions</code>
 */
class TransferOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * When to overwrite objects that already exist in the sink. The default is
     * that only objects that are different from the source are ovewritten. If
     * true, all objects in the sink whose name matches an object in the source
     * will be overwritten with the source object.
     *
     * Generated from protobuf field <code>bool overwrite_objects_already_existing_in_sink = 1;</code>
     */
    private $overwrite_objects_already_existing_in_sink = false;
    /**
     * Whether objects that exist only in the sink should be deleted.
     * **Note:** This option and [delete_objects_from_source_after_transfer]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_unique_in_sink = 2;</code>
     */
    private $delete_objects_unique_in_sink = false;
    /**
     * Whether objects should be deleted from the source after they are
     * transferred to the sink.
     * **Note:** This option and [delete_objects_unique_in_sink]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_from_source_after_transfer = 3;</code>
     */
    private $delete_objects_from_source_after_transfer = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $overwrite_objects_already_existing_in_sink
     *           When to overwrite objects that already exist in the sink. The default is
     *           that only objects that are different from the source are ovewritten. If
     *           true, all objects in the sink whose name matches an object in the source
     *           will be overwritten with the source object.
     *     @type bool $delete_objects_unique_in_sink
     *           Whether objects that exist only in the sink should be deleted.
     *           **Note:** This option and [delete_objects_from_source_after_transfer]
     *           [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
     *           are mutually exclusive.
     *     @type bool $delete_objects_from_source_after_transfer
     *           Whether objects should be deleted from the source after they are
     *           transferred to the sink.
     *           **Note:** This option and [delete_objects_unique_in_sink]
     *           [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
     *           are mutually exclusive.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * When to overwrite objects that already exist in the sink. The default is
     * that only objects that are different from the source are ovewritten. If
     * true, all objects in the sink whose name matches an object in the source
     * will be overwritten with the source object.
     *
     * Generated from protobuf field <code>bool overwrite_objects_already_existing_in_sink = 1;</code>
     * @return bool
     */
    public function getOverwriteObjectsAlreadyExistingInSink()
    {
        return $this->overwrite_objects_already_existing_in_sink;
    }

    /**
     * When to overwrite objects that already exist in the sink. The default is
     * that only objects that are different from the source are ovewritten. If
     * true, all objects in the sink whose name matches an object in the source
     * will be overwritten with the source object.
     *
     * Generated from protobuf field <code>bool overwrite_objects_already_existing_in_sink = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setOverwriteObjectsAlreadyExistingInSink($var)
    {
        GPBUtil::checkBool($var);
        $this->overwrite_objects_already_existing_in_sink = $var;

        return $this;
    }

    /**
     * Whether objects that exist only in the sink should be deleted.
     * **Note:** This option and [delete_objects_from_source_after_transfer]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_unique_in_sink = 2;</code>
     * @return bool
     */
    public function getDeleteObjectsUniqueInSink()
    {
        return $this->delete_objects_unique_in_sink;
    }

    /**
     * Whether objects that exist only in the sink should be deleted.
     * **Note:** This option and [delete_objects_from_source_after_transfer]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_unique_in_sink = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setDeleteObjectsUniqueInSink($var)
    {
        GPBUtil::checkBool($var);
        $this->delete_objects_unique_in_sink = $var;

        return $this;
    }

    /**
     * Whether objects should be deleted from the source after they are
     * transferred to the sink.
     * **Note:** This option and [delete_objects_unique_in_sink]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_from_source_after_transfer = 3;</code>
     * @return bool
     */
    public function getDeleteObjectsFromSourceAfterTransfer()
    {
        return $this->delete_objects_from_source_after_transfer;
    }

    /**
     * Whether objects should be deleted from the source after they are
     * transferred to the sink.
     * **Note:** This option and [delete_objects_unique_in_sink]
     * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
     * are mutually exclusive.
     *
     * Generated from protobuf field <code>bool delete_objects_from_source_after_transfer = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setDeleteObjectsFromSourceAfterTransfer($var)
    {
        GPBUtil::checkBool($var);
        $this->delete_objects_from_source_after_transfer = $var;

        return $this;
    }

}

