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

/**
 * Generated from protobuf message <code>OS.PB.FileSystemResponse</code>
 */
class FileSystemResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The RPC status, 0 for Ok or success
     *
     * Generated from protobuf field <code>.OS.PB.FileResultTypes Result = 1;</code>
     */
    protected $Result = 0;
    /**
     * The file path that was deleted
     *
     * Generated from protobuf field <code>string Path = 2;</code>
     */
    protected $Path = '';
    /**
     * If list request, then lists all files and paths
     *
     * Generated from protobuf field <code>repeated .OS.PB.ListResult Paths = 3 [packed = false];</code>
     */
    private $Paths;
    /**
     * If reading, contains the segmented data for the response
     *
     * Generated from protobuf field <code>bytes Data = 5;</code>
     */
    protected $Data = '';
    /**
     * When requesting the file size
     *
     * Generated from protobuf field <code>uint32 Size = 6;</code>
     */
    protected $Size = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Result
     *           The RPC status, 0 for Ok or success
     *     @type string $Path
     *           The file path that was deleted
     *     @type \OS\PB\ListResult[] $Paths
     *           If list request, then lists all files and paths
     *     @type string $Data
     *           If reading, contains the segmented data for the response
     *     @type int $Size
     *           When requesting the file size
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Filesystem::initOnce();
        parent::__construct($data);
    }

    /**
     * The RPC status, 0 for Ok or success
     *
     * Generated from protobuf field <code>.OS.PB.FileResultTypes Result = 1;</code>
     * @return int
     */
    public function getResult()
    {
        return $this->Result;
    }

    /**
     * The RPC status, 0 for Ok or success
     *
     * Generated from protobuf field <code>.OS.PB.FileResultTypes Result = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\FileResultTypes::class);
        $this->Result = $var;

        return $this;
    }

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

    /**
     * The file path that was deleted
     *
     * 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;
    }

    /**
     * If list request, then lists all files and paths
     *
     * Generated from protobuf field <code>repeated .OS.PB.ListResult Paths = 3 [packed = false];</code>
     * @return RepeatedField<\OS\PB\ListResult>
     */
    public function getPaths()
    {
        return $this->Paths;
    }

    /**
     * If list request, then lists all files and paths
     *
     * Generated from protobuf field <code>repeated .OS.PB.ListResult Paths = 3 [packed = false];</code>
     * @param \OS\PB\ListResult[] $var
     * @return $this
     */
    public function setPaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \OS\PB\ListResult::class);
        $this->Paths = $arr;

        return $this;
    }

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

    /**
     * If reading, contains the segmented data for the response
     *
     * 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;
    }

    /**
     * When requesting the file size
     *
     * Generated from protobuf field <code>uint32 Size = 6;</code>
     * @return int
     */
    public function getSize()
    {
        return $this->Size;
    }

    /**
     * When requesting the file size
     *
     * Generated from protobuf field <code>uint32 Size = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setSize($var)
    {
        GPBUtil::checkUint32($var);
        $this->Size = $var;

        return $this;
    }

}

