<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: filesystem.proto

namespace OS\PB;

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

/**
 **
 * \@brief   Either create, list, copy or deletes a file from the filesystem
 *
 * Generated from protobuf message <code>OS.PB.FileSystemRequest</code>
 */
class FileSystemRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The file path to delete or copy to
     *
     * Generated from protobuf field <code>string Path = 2;</code>
     */
    protected $Path = '';
    /**
     * Only used with copying, where to copy the file from
     *
     * Generated from protobuf field <code>string SourcePath = 3;</code>
     */
    protected $SourcePath = '';
    /**
     * Default 0: The device id from which to perform FileRead RPC. If 0 or its own id, then copies from its own file system
     *
     * Generated from protobuf field <code>uint64 SourceDeviceId = 4;</code>
     */
    protected $SourceDeviceId = 0;
    /**
     * If writing, contains the segmented data for writing
     *
     * Generated from protobuf field <code>bytes Data = 5;</code>
     */
    protected $Data = '';
    /**
     * If a custom offset is required for writing, typically not used for FileWrite
     *
     * Generated from protobuf field <code>uint32 Offset = 6;</code>
     */
    protected $Offset = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $Path
     *           The file path to delete or copy to
     *     @type string $SourcePath
     *           Only used with copying, where to copy the file from
     *     @type int|string $SourceDeviceId
     *           Default 0: The device id from which to perform FileRead RPC. If 0 or its own id, then copies from its own file system
     *     @type string $Data
     *           If writing, contains the segmented data for writing
     *     @type int $Offset
     *           If a custom offset is required for writing, typically not used for FileWrite
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Filesystem::initOnce();
        parent::__construct($data);
    }

    /**
     * The file path to delete or copy to
     *
     * Generated from protobuf field <code>string Path = 2;</code>
     * @return string
     */
    public function getPath()
    {
        return $this->Path;
    }

    /**
     * The file path to delete or copy to
     *
     * Generated from protobuf field <code>string Path = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->Path = $var;

        return $this;
    }

    /**
     * Only used with copying, where to copy the file from
     *
     * Generated from protobuf field <code>string SourcePath = 3;</code>
     * @return string
     */
    public function getSourcePath()
    {
        return $this->SourcePath;
    }

    /**
     * Only used with copying, where to copy the file from
     *
     * Generated from protobuf field <code>string SourcePath = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSourcePath($var)
    {
        GPBUtil::checkString($var, True);
        $this->SourcePath = $var;

        return $this;
    }

    /**
     * Default 0: The device id from which to perform FileRead RPC. If 0 or its own id, then copies from its own file system
     *
     * Generated from protobuf field <code>uint64 SourceDeviceId = 4;</code>
     * @return int|string
     */
    public function getSourceDeviceId()
    {
        return $this->SourceDeviceId;
    }

    /**
     * Default 0: The device id from which to perform FileRead RPC. If 0 or its own id, then copies from its own file system
     *
     * Generated from protobuf field <code>uint64 SourceDeviceId = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSourceDeviceId($var)
    {
        GPBUtil::checkUint64($var);
        $this->SourceDeviceId = $var;

        return $this;
    }

    /**
     * If writing, contains the segmented data for writing
     *
     * Generated from protobuf field <code>bytes Data = 5;</code>
     * @return string
     */
    public function getData()
    {
        return $this->Data;
    }

    /**
     * If writing, contains the segmented data for writing
     *
     * Generated from protobuf field <code>bytes Data = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkString($var, False);
        $this->Data = $var;

        return $this;
    }

    /**
     * If a custom offset is required for writing, typically not used for FileWrite
     *
     * Generated from protobuf field <code>uint32 Offset = 6;</code>
     * @return int
     */
    public function getOffset()
    {
        return $this->Offset;
    }

    /**
     * If a custom offset is required for writing, typically not used for FileWrite
     *
     * Generated from protobuf field <code>uint32 Offset = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setOffset($var)
    {
        GPBUtil::checkUint32($var);
        $this->Offset = $var;

        return $this;
    }

}

